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

nullable (3.1.0) is not being acknowledged by Wiretap #136

Closed
Samuel-Morgan-Tyghe opened this issue Sep 9, 2024 · 3 comments
Closed

nullable (3.1.0) is not being acknowledged by Wiretap #136

Samuel-Morgan-Tyghe opened this issue Sep 9, 2024 · 3 comments

Comments

@Samuel-Morgan-Tyghe
Copy link

Samuel-Morgan-Tyghe commented Sep 9, 2024

image
    ErrorResponse:
      type: object
      nullable: true
      properties:
        errorCode:
          type: integer
          format: int64
          example: 4001
        statusCode:
          "$ref": "#/components/schemas/HttpStatusCode"
        message:
          type: string
          example: "Bad Request"
      example:
        errorCode: 4001
        statusCode:
          error: true
          is4xxClientError: true
          is5xxServerError: false
          is1xxInformational: false
          is2xxSuccessful: false
          is3xxRedirection: false
        message: "Bad Request"

the following works though

    ErrorResponse:
      oneOf:
        - type: object
        - type: "null"
      properties:
        errorCode:
          type: integer
          format: int64
          example: 4001
        statusCode:
          "$ref": "#/components/schemas/HttpStatusCode"
        message:
          type: string
          example: "Bad Request"
      example:
        errorCode: 4001
        statusCode:
          error: true
          is4xxClientError: true
          is5xxServerError: false
          is1xxInformational: false
          is2xxSuccessful: false
          is3xxRedirection: false
        message: "Bad Request"
@collin-rogers
Copy link

I also saw this on my 3.1.0 schema and commented on #97

@LasneF
Copy link

LasneF commented Sep 16, 2024

@collin-rogers , @Samuel-Morgan-Tyghe your request is not legitimate , as nullable is not a supported keyword neither by OAS 3.1.0 cf https://spec.openapis.org/oas/latest.html

neither by Json schema ,

nullable was part of 3.0.0 and has been abandonned as a breaking change by OAS, so i would advise to upgrade your schema to comply with OAS 3.1.0

@Samuel-Morgan-Tyghe
Copy link
Author

@LasneF Thank you for informing me, I thought it was the other way around and a new feature of OAS :)

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

No branches or pull requests

3 participants