Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supported OpenApi 3.1.0 nullable changes. #263

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Conversation

cjbooms
Copy link
Owner

@cjbooms cjbooms commented Jan 28, 2024

Fabrikt will now detect of the newer 3.1.0 specification is declared and automatically downgrade any of the json schema nullable types to the previous format. EG, this:

    NewNullableFormat:
      type: object
      required:
        - version
      properties:
        version:
          type:
            - string
            - 'null'

Will get converted to this:

    NewNullableFormat:
      type: object
      required:
        - version
      properties:
        version:
          type: string
          nullable: true

Related to #262

Fabrikt will now detect of the newer 3.1.0 specification is declared and automatically downgrade any of the json schema nullable types to the previous format.
EG, this:
```
    NewNullableFormat:
      type: object
      required:
        - version
      properties:
        version:
          type:
            - string
            - 'null'
```
Will get converted to this:
```
    NewNullableFormat:
      type: object
      required:
        - version
      properties:
        version:
          type: string
          nullable: true
```
@cjbooms cjbooms requested a review from averabaq January 28, 2024 20:53
@cjbooms cjbooms merged commit 467eb6c into master Jan 29, 2024
1 check passed
@cjbooms cjbooms deleted the openapi-3.1_nullable branch January 29, 2024 20:34
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.

1 participant