swagger-api / swagger-api/swagger-ui
Date object support with @ApiModelProperty
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
We are using apimodelproperty with our domain object like below,
class DateClass{
@ApiModelProperty(example = "2019-12-24")
private LocalDate checkIn;
@ApiModelProperty(example = "2019-12-25")
private LocalDate checkOut;
}
Instead of giving some random date here, I want checkIn as today date and checkOut as one day ahead of checkIn date.
Any way to achieve this? Thanks in advance.
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
The report mentions @ApiModelProperty, LocalDate, and the checkIn and checkOut fields, but no Swagger UI file or test. Start by determining whether dynamic date-based examples are supported for this API model annotation; done means establishing whether today and the following day can be represented and documenting the answer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100