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
Execution failed for task ':openApiGenerate'.
> There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
| Error count: 1, Warning count: 0
Errors:
-attribute paths.'/foobar'(get).[jsonFilter].content is unexpected
Bug Report Checklist
Description
According to https://swagger.io/docs/specification/describing-parameters/#schema-vs-content we can use
content
along with a nestedschema
to specify that query params are encoded as JSON objects. OpenAPIGenerator does not seem to respect this and gives the following error:openapi-generator version
4.3.0 Gradle plugin
OpenAPI declaration file content or url
{"swagger":"3.0.1", "info": {"title": "Content test"}, "host":"localhost","basePath":"/","tags":[{"name":"FooAPI"}],"paths":{"/foobar":{"get":{"tags":["FooAPI"],"operationId":"getFoobar","produces":["application/json"],"parameters":[{"name": "jsonFilter", "in": "query", "type": "object", "content": {"application/json": {"schema": {"type": "object", "properties": {"wheeee": "string"}}}}}],"responses":{"200":{"description":"Ok","schema":{"type":"string"}},"400":{"description":"Bad Request","schema":{"type":"string"}}}}}}}
Command line used for generation
The text was updated successfully, but these errors were encountered: