You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it seems, that currently only regular setters are scanned/resolved for Annotations (Schema, SchemaProperty). For example:
The following setter method is recognized in my quarkus service, that uses smallrye-open-api, and it will show in the swagger-ui (in the examples area of swagger), like defined here:
Normal Setter:
@Schema(name = "createdAt", example = "1618312800000", type = SchemaType.NUMBER, format = "date-time", description = "Timestamp in milliseconds since 1970-01-01T00:00:00Z")
public void setCreatedAt(LocalDateTime value);
It is often very convenient to use "fluent setters", which return the Class instance to make fluent setter calls possible. If not know, i want to show this convenience in following example:
Product product = new Product()
.setCreatedAt(123433434L)
.setTitle("test")
.setType(3);
The JSON Library Jackson does correctly recognize those fluent setters, so it seems that some libraries already support them. The jOOQ Library (Object Oriented Queries) also is able to create fluent setters into the code.
Following example does not seem to be recognized by smallrye-open-api, as it does not show up in the swagger-ui:
Fluent Setter:
@Schema(name = "createdAt", example = "1618312800000", type = SchemaType.NUMBER, format = "date-time", description = "Timestamp in milliseconds since 1970-01-01T00:00:00Z")
public IProduct setCreatedAt(LocalDateTime value);
It would be cool if you could consider making this possible :) thanks in advance.
The text was updated successfully, but these errors were encountered:
it seems, that currently only regular setters are scanned/resolved for Annotations (Schema, SchemaProperty). For example:
The following setter method is recognized in my quarkus service, that uses smallrye-open-api, and it will show in the swagger-ui (in the examples area of swagger), like defined here:
Normal Setter:
It is often very convenient to use "fluent setters", which return the Class instance to make fluent setter calls possible. If not know, i want to show this convenience in following example:
The JSON Library Jackson does correctly recognize those fluent setters, so it seems that some libraries already support them. The jOOQ Library (Object Oriented Queries) also is able to create fluent setters into the code.
Following example does not seem to be recognized by smallrye-open-api, as it does not show up in the swagger-ui:
Fluent Setter:
It would be cool if you could consider making this possible :) thanks in advance.
The text was updated successfully, but these errors were encountered: