Skip to content

Azizullah0/Meeting_Scheduler_API_HATEOAS-enabled-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meeting Scheduler API

Spring Boot implementation of a design-first, HATEOAS-enabled meeting scheduler (doodle-like) based on the OpenAPI spec.

What’s implemented

  • Design-first OpenAPI (openapi/openapi.yaml, served as static/openapi.yaml).
  • Thin controller delegating to service/mappers; endpoints: create/list meetings, add/remove slots, submit votes, get summary.
  • HATEOAS: Link headers and _links in bodies for meetings and slots.
  • Integration tests:
    • MockMvc happy paths, HATEOAS assertions, and 404 cases.
    • Client-stub end-to-end test using generated Java client (ClientStubsIntegrationTest).

Running the app

cd server
mvn spring-boot:run
# defaults to server.port=7878 (see application.properties)

Swagger UI: http://localhost:7878/swagger-ui/index.html (served from static/openapi.yaml).

Tests

cd server
mvn test

Includes MockMvc ITs and the generated-client IT.

Generated client (optional)

Client generated into client/ via openapi-generator-cli (7.6.0). If you regenerate:

openapi-generator-cli generate \
  -g java \
  -i server/src/main/resources/static/openapi.yaml \
  -o client \
  --api-package org.openapitools.client.api \
  --model-package org.openapitools.client.model \
  --artifact-id meeting-client \
  --group-id org.openapitools \
  --additional-properties=library=resttemplate,dateLibrary=java8
mvn -f client/pom.xml clean install

Then ensure server/pom.xml has the test-scoped dependency on meeting-client.

Useful cURL examples

# create meeting
curl -i -X POST http://localhost:7878/meetings \
  -H "Content-Type: application/json" \
  -d '{ "title": "Project Sync" }'

# add slot (replace MEETING_ID)
curl -i -X POST http://localhost:7878/meetings/MEETING_ID/slots \
  -H "Content-Type: application/json" \
  -d '{ "startTime": "2025-01-10T10:00:00Z", "endTime": "2025-01-10T11:00:00Z" }'

# vote (replace MEETING_ID, SLOT_ID)
curl -i -X POST http://localhost:7878/meetings/MEETING_ID/votes \
  -H "Content-Type: application/json" \
  -d '[{ "slotId": "SLOT_ID", "user": "Alice", "availability": "true" }]'

# summary
curl -i http://localhost:7878/meetings/MEETING_ID/summary

About

Advanced Spring Boot implementation of a HATEOAS-enabled meeting scheduler API with OpenAPI specification, integration tests, and generated client.

Keywords: java, spring-boot, hateoas, openapi, rest-api, integration-tests

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages