Describe the bug
revision_id still in the schema and since it's hidden it should not appear in the schema
hidden is not compliant with OpenAPI/JSONSchema
To Reproduce
class MyModel(Document):
a:int
print(MyModel.get_hidden_fields())
print(MyModel.schema_json(indent=2))
Expected behavior
since the field is hidden it should not appear in the schema
this causes some OpenAPI tools to crash, e.g: generating a client
docker run --network host --rm -v "{PWD}:/local" openapitools/openapi-generator-cli generate \
-i local/openapi.json \
-g python \
-o /local/out/python
Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
| Error count: 3, Warning count: 0
Errors:
-attribute components.schemas.Model.hidden is unexpected
-attribute paths.'/Model'(get).parameters.[revision_id].schemas.hidden is unexpected
-attribute components.schemas.Model.hidden is unexpected
Describe the bug revision_id still in the schema and since it's hidden it should not appear in the schema
hidden
is not compliant with OpenAPI/JSONSchemaTo Reproduce
Expected behavior since the field is hidden it should not appear in the schema this causes some OpenAPI tools to crash, e.g: generating a client