question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Properties without @Schema annotation of type LocalTime missing in openapi.json

See original GitHub issue

I use swagger-annotations (2.0.5) to generate my openapi.json file.

When using a property of type java.time.LocalTime named a, it produces the following (shown in Swagger UI):

a

When I have 2 or more properties of type java.time.LocalTime and these properties are not annotated with @Schema and a name attribute, then only the last one is present in the openapi.json file. I.e.:

private LocalTime a;
private LocalTime b;
private LocalTime c;

with corresponding getters and setters on an API model only outputs the last property of type java.time.LocalTime:

schemaarticle

Usually I do not annotate my properties with @Schema when not needed. Do I miss something here or is this a bug? Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ryanceriumcommented, May 24, 2019

I opened #3212 to address org.joda.time.LocalDateTime @emigioria .

0reactions
frantumacommented, May 25, 2019

fixed in #3212, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation for the java Generator
Annotate Model and Api using the Swagger Annotations 1.x library. none. apiPackage, package for generated api classes, org.openapitools.client.
Read more >
Extending Swagger and Spring Doc Open API - Accion Labs
See how to extend swagger behavior and communicate via its automated documentation the information regarding additional annotations and more ...
Read more >
How can I fix Additional properties not allowed on OpenAPI?
It looks like Additional properties not allowed: schema at #/properties/phase is the core error and I'm not sure how to fix it (I...
Read more >
Jsonschema2Pojo Task
JSON (documents that represent an example of the kind of json data that the generated Java types will be mapped to). No (default...
Read more >
OpenAPI Specification - Version 3.0.3 - Swagger
Types that are not accompanied by a format property follow the type definition in the JSON Schema. Tools that do not recognize a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found