Open fjtirado opened 1 year ago
Hi @hbelmiro and @fjtirado , how are you? I think that I can get this one!
@mcruzdev I was looking into it The culprit is here https://github.com/swagger-api/swagger-parser/blob/master/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/OpenAPIDeserializer.java#L2709 That creates an ArraySchema, which causes this method https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java#L268 to ignore the properties part and do not create the request POJO I tried to replace the OpenApiDeserializer by my own, but thats prevented by this line https://github.com/swagger-api/swagger-parser/blob/master/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/OpenAPIV3Parser.java#L67 Changing the options path is also blocked by this https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java#L635 So I guess we needs to see how to extends InlineModelResolver. Just contact me at zulip https://kie.zulipchat.com and we will discuss
@mcruzdev Follow up of my previous comment, InlineModelResolver is not an option either https://github.com/swagger-api/swagger-parser/blob/master/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/OpenAPIV3Parser.java#L246 Anyway, lets talk and see how this can be fixed
From following snippet
Items should be ignored and properties used to generate a pojo, but currently the generator is doing the other way around