Skip to content

Map nullable to null type - #1

Draft
funkeyfreak wants to merge 5 commits into
release/2.0.0from
funkeyfreak/supportNullInTypeArray
Draft

funkeyfreak wants to merge 5 commits into
release/2.0.0from
funkeyfreak/supportNullInTypeArray

Conversation

@funkeyfreak

@funkeyfreak funkeyfreak commented Feb 22, 2023 •

Copy link
Copy Markdown
Owner

This PR:

  • Remaps nullable to type array to the OpenAPI schema object model
  • Adds logic to serialize and deserialize the schema object
  • Adds tests to validate serialization and deserialization

Design Decision(s):

  • Opted to add a new property to the OpenApiSchema model named TypeArray, which will represent the new type format
  • Added logic within serialization code to handle nullable constraints, allowing for the reuse of the current serialization functions. However, we recommend splitting out OpenAPI 3.1 parsing into it's own execution path.

NOTES:

  • As it is, the current execution path for OpenAPI 3.1 is cluttered. There are disparate approaches to allow 3.0 and 3.1 specifications to be rendered using the same function. I am considering splitting out this functionality - let me know your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants