mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 18:02:44 +00:00
#18058 Fix the Java generator to generate valid @RequestMappings where the produce field takes list of string parameters instead of a single comma-separated string (#18092)
* #18058 Fix AbstractJavaCodegen.getAccepts() so it returns a String array instead of a comma-separated string, and fixed api.mustache so the @RequestMapping annotation generated produces for x-accepts as a parameter list instead of a (single) string. * #18058 Updated test case to accept a string array instead of a comma-separated list. * #18058 Reverted changes on imported compared to the main branch. * #18058 getAccepts() is now hybrid, and can return both a single String or a String[]. * #18058 Rolled back the hybrid getAccepts(), so it only returns a String array. * #18058 Updated mustache files to cope with vendorExtensions.x-accepts being a string array instead of a comma-separated string. * #18058 Generated new sample files with by running `./bin/generate-samples.sh ./bin/configs/*.yaml` * #18058 Optimization of getAccepts() * #18058 Regenerated scripts that got broken after resolving conflicts on GitHub * #18058 Fixed introduced issue with api.mustache causing a redundant accept with @HttpExchange with the PetApi.java, StoreApi.java, and UserApi.java.
This commit is contained in:
committed by
GitHub
parent
c7e9bd2f29
commit
a4508f6817
@@ -51,7 +51,8 @@ paths:
|
||||
summary: Use both API keys
|
||||
tags:
|
||||
- usage
|
||||
x-accepts: application/json
|
||||
x-accepts:
|
||||
- application/json
|
||||
/any:
|
||||
get:
|
||||
description: Use any API key
|
||||
@@ -69,7 +70,8 @@ paths:
|
||||
summary: Use any API key
|
||||
tags:
|
||||
- usage
|
||||
x-accepts: application/json
|
||||
x-accepts:
|
||||
- application/json
|
||||
/query:
|
||||
get:
|
||||
description: Use API key in query
|
||||
@@ -86,7 +88,8 @@ paths:
|
||||
summary: Use API key in query
|
||||
tags:
|
||||
- usage
|
||||
x-accepts: application/json
|
||||
x-accepts:
|
||||
- application/json
|
||||
/header:
|
||||
get:
|
||||
description: Use API key in header
|
||||
@@ -103,7 +106,8 @@ paths:
|
||||
summary: Use API key in header
|
||||
tags:
|
||||
- usage
|
||||
x-accepts: application/json
|
||||
x-accepts:
|
||||
- application/json
|
||||
components:
|
||||
schemas: {}
|
||||
securitySchemes:
|
||||
|
||||
Reference in New Issue
Block a user