There is a warning when an inline type is a map
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
[main] WARN o.o.codegen.DefaultCodegen - Unknown type found in the schema: object
is this really a valid warning or simply something in code is not handled.
master
/default/test:
get:
tags:
- ApplicationEndpointTest
description: " Test"
operationId: testApi
consumes:
- application/json
produces:
- application/json
parameters:
- name: "body"
in: "body"
description: "Requests to post"
required: true
schema:
type: "object"
additionalProperties:
type: "string"
responses:
200:
description: "Successful response"
schema:
type: "object"
404:
description: "The request was not successfully executed."
java -jar ~/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar \
generate -i ./api.yaml -o ./gengo-server -g go-server
I鈥檓 starting out with openapi-codegen and this message is confusing me. Imho object is a perfectly reasonable type wrt JSON schema. It can also be found here http://openapi-map.apihandyman.io/?version=2.0.
This also shows up if you define a "free form" field:
"free_form_object_field": {
"type":"object"
}
This is also perfectly valid and should produce a field of type jackson ObjectNode or something similar.
Is there an actual error case that needs to be handled here or is the message completely spurious?
Issue solved in v4.0.x
Most helpful comment
I鈥檓 starting out with openapi-codegen and this message is confusing me. Imho
objectis a perfectly reasonable type wrt JSON schema. It can also be found here http://openapi-map.apihandyman.io/?version=2.0.