swagger-api / swagger-api/swagger-codegen-generators
Support for Spring HATEOS Pagination
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
The JavaSpring api.mustache doesn't support spring pagination with spring hateoas at the moment. For an endpoint with pagination, one has to manually define a paged object and use it as an API response. It would be nice to declare within the OpenAPI specification which endpoints should use pagination and conditionally generate an endpoint with spring hateoas pagination.
Such an endpoint with pagination could return a PagedModel provided by spring hatoas which contains everything needed for pagination and take a Pageable instance also provided by spring hateoas as a parameter containing parameters for size, sort, page.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the JavaSpring api.mustache template and inspect how OpenAPI endpoint responses and parameters are generated. Define how pagination is declared in the OpenAPI specification, then determine how endpoints should generate Spring HATEOAS PagedModel responses and Pageable parameters; done means paginated endpoints no longer require a manually defined paged object.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100