Open paladinzh opened 4 years ago
You can use {{#isFreeFormObject}} .. {{/isFreeFormObject}}
in the template
You can use
{{#isFreeFormObject}} .. {{/isFreeFormObject}}
in the template
As of 6.3.0, this suggestion has no effect (presumably since #7373 was merged). The provided example in the problem statement appears to be a (quoting the source)
// 1. free form with no validation that is not allOf included in any composed schemas
It seems like this case is disallowed, or otherwise not implemented in DefaultGenerator.java:490
. Apparently, however, this is a common enough practice that DMTF's Redfish specification contains 33 examples of this. I'm not sure why this PR was abandoned, but is the community still willing to entertain a PR to resolve this?
Bug Report Checklist
Description
Not support free-form object code generated
openapi-generator version
OpenAPI declaration file content or url
modules/openapi-generator/src/test/resources/3_0/rust-server/openapi-v3.yaml get: tags: [Repo, Info] operationId: Get Repo\Info responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/RepoObject"
RepoObject: type: object
Command line used for generation
bin/rust-server-petstore.sh
Steps to reproduce
Run the generated code openapi-v3/
Related issues/PRs
No
Suggest a fix
Allow generate free-form object.