openapi-json-schema-tools / openapi-json-schema-generator

OpenAPI JSON Schema Generator allows auto-generation of API client libraries with a focus on JSON schema given an OpenAPI document
Apache License 2.0
150 stars 15 forks source link

Fixes Issue 422, const in python #443

Closed spacether closed 3 months ago

spacether commented 3 months ago

Fixes Issue 422, const in python

PR checklist

spacether commented 3 months ago

I verified that this fix works by sucessfully generating a python client using the openapi document from https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/issues/442:

justinblack@Justins-MacBook-Air openapi-json-schema-generator % java -jar target/openapi-json-schema-generator-cli.jar generate \
   -i const_doc.json \
   -g python \
   -o ./out/
...
[main] INFO  o.o.c.templating.TemplateManager - writing file /Users/justinblack/programming/openapi-json-schema-generator/./out/.openapi-generator-ignore
[main] INFO  o.o.c.templating.TemplateManager - writing file /Users/justinblack/programming/openapi-json-schema-generator/./out/.openapi-generator/VERSION
[main] INFO  o.o.c.templating.TemplateManager - writing file /Users/justinblack/programming/openapi-json-schema-generator/./out/.openapi-generator/FILES
[main] INFO  o.o.c.g.DefaultGeneratorRunner - ################################################################################
[main] INFO  o.o.c.g.DefaultGeneratorRunner - # Thanks for using OpenAPI JSON Schema Generator.                              #
[main] INFO  o.o.c.g.DefaultGeneratorRunner - # Please consider donation to help us maintain this project 🙏                 #
[main] INFO  o.o.c.g.DefaultGeneratorRunner - # https://github.com/sponsors/spacether                                        #
[main] INFO  o.o.c.g.DefaultGeneratorRunner - ################################################################################