Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,12 @@ private List<OpenAPIResponsePrism> buildApiResponses() {
public void readOperation(Operation operation, Javadoc javadoc) {
OperationPrism.getOptionalOn(element).ifPresent(an -> {
operation.setOperationId(emptyToNull(an.operationId()));
operation.setDeprecated(an.deprecated());
operation.setSummary(emptyToNull(an.summary()));
operation.setDescription(emptyToNull(an.description()));
if (Boolean.TRUE.equals(an.deprecated())) {
// leave deprecated false as NULL to reduce openapi noise
operation.setDeprecated(true);
}
});
if (operation.getDescription() == null) {
operation.setDescription(javadoc.getDescription());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ HelloDto hello(int id, LocalDate date, String otherParam) {
* @return The Hellos that we found.
*/
@Roles(AppRoles.ADMIN)
@Operation(operationId = "findByName")
@Get("/findbyname/{name}")
List<HelloDto> findByName(String name, @QueryParam("my-param") @Default("one") String myParam) {
return new ArrayList<>();
Expand Down
1 change: 1 addition & 0 deletions tests/test-javalin/src/main/resources/public/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@
],
"summary" : "Find Hellos by name",
"description" : "",
"operationId" : "findByName",
"parameters" : [
{
"name" : "name",
Expand Down