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 @@ -150,7 +150,7 @@ public interface {{classname}} {
{{/vendorExtensions.x-tags.size}}
responses = {
{{#responses}}
@ApiResponse(responseCode = "{{{code}}}", description = "{{{message}}}"{{#baseType}}, content = {
@ApiResponse(responseCode = {{#isDefault}}"default"{{/isDefault}}{{^isDefault}}"{{{code}}}"{{/isDefault}}, description = "{{{message}}}"{{#baseType}}, content = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code change looks great! Should there be a unit test for this? I'm also happy to add it if you think it adds value

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, samples are updated. do you think we still need unit test for this? If yes I can add them quickly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry missed this. I do think unit tests still add value because if someone breaks it, the unit tests will block the submission (hopefully) or alert them that the samples were updated incorrectly. I can add these in a few days and send out for review

{{#produces}}
@Content(mediaType = "{{{mediaType}}}", {{#isArray}}array = @ArraySchema({{/isArray}}schema = @Schema(implementation = {{{baseType}}}.class){{#isArray}}){{/isArray}}){{^-last}},{{/-last}}
{{/produces}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public interface UserApi {
description = "This can only be done by the logged in user.",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -80,7 +80,7 @@ ResponseEntity<Void> createUser(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -109,7 +109,7 @@ ResponseEntity<Void> createUsersWithArrayInput(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -233,7 +233,7 @@ ResponseEntity<String> loginUser(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public interface UserApi {
description = "This can only be done by the logged in user.",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -75,7 +75,7 @@ CompletableFuture<ResponseEntity<Void>> createUser(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -98,7 +98,7 @@ CompletableFuture<ResponseEntity<Void>> createUsersWithArrayInput(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand Down Expand Up @@ -209,7 +209,7 @@ CompletableFuture<ResponseEntity<String>> loginUser(
summary = "Logs out current logged in user session",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public interface UserApi {
description = "This can only be done by the logged in user.",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -74,7 +74,7 @@ ResponseEntity<Void> createUser(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -97,7 +97,7 @@ ResponseEntity<Void> createUsersWithArrayInput(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand Down Expand Up @@ -208,7 +208,7 @@ ResponseEntity<String> loginUser(
summary = "Logs out current logged in user session",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public interface UserApi {
description = "This can only be done by the logged in user.",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -74,7 +74,7 @@ ResponseEntity<Void> createUser(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -97,7 +97,7 @@ ResponseEntity<Void> createUsersWithArrayInput(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand Down Expand Up @@ -208,7 +208,7 @@ ResponseEntity<String> loginUser(
summary = "Logs out current logged in user session",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -230,7 +230,7 @@ ResponseEntity<Void> logoutUser(
summary = "logoutUserOptions",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "endpoint configuration response")
@ApiResponse(responseCode = "default", description = "endpoint configuration response")
}
)
@RequestMapping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public interface UserApi {
description = "This can only be done by the logged in user.",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -80,7 +80,7 @@ ResponseEntity<Void> createUser(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -109,7 +109,7 @@ ResponseEntity<Void> createUsersWithArrayInput(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -233,7 +233,7 @@ ResponseEntity<String> loginUser(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public interface UserApi {
description = "This can only be done by the logged in user.",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -74,7 +74,7 @@ ResponseEntity<Void> createUser(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -97,7 +97,7 @@ ResponseEntity<Void> createUsersWithArrayInput(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand Down Expand Up @@ -208,7 +208,7 @@ ResponseEntity<String> loginUser(
summary = "Logs out current logged in user session",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ default Optional<NativeWebRequest> getRequest() {
description = "This can only be done by the logged in user.",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -81,7 +81,7 @@ default ResponseEntity<Void> createUser(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -107,7 +107,7 @@ default ResponseEntity<Void> createUsersWithArrayInput(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand Down Expand Up @@ -244,7 +244,7 @@ default ResponseEntity<String> loginUser(
summary = "Logs out current logged in user session",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ default Optional<NativeWebRequest> getRequest() {
description = "This can only be done by the logged in user.",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -87,7 +87,7 @@ default ResponseEntity<Void> createUser(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -119,7 +119,7 @@ default ResponseEntity<Void> createUsersWithArrayInput(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -269,7 +269,7 @@ default ResponseEntity<String> loginUser(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ default Optional<NativeWebRequest> getRequest() {
description = "This can only be done by the logged in user.",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -87,7 +87,7 @@ default ResponseEntity<Void> createUser(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -119,7 +119,7 @@ default ResponseEntity<Void> createUsersWithArrayInput(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down Expand Up @@ -269,7 +269,7 @@ default ResponseEntity<String> loginUser(
description = "",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
},
security = {
@SecurityRequirement(name = "api_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ default Optional<NativeWebRequest> getRequest() {
description = "This can only be done by the logged in user.",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -81,7 +81,7 @@ default ResponseEntity<Void> createUser(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand All @@ -107,7 +107,7 @@ default ResponseEntity<Void> createUsersWithArrayInput(
summary = "Creates list of users with given input array",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand Down Expand Up @@ -244,7 +244,7 @@ default ResponseEntity<String> loginUser(
summary = "Logs out current logged in user session",
tags = { "user" },
responses = {
@ApiResponse(responseCode = "200", description = "successful operation")
@ApiResponse(responseCode = "default", description = "successful operation")
}
)
@RequestMapping(
Expand Down
Loading