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

disable openapi schema format validation #712

Merged
merged 1 commit into from
Feb 4, 2022

Conversation

eguzki
Copy link
Member

@eguzki eguzki commented Feb 1, 2022

As per the OAS: https://spec.openapis.org/oas/v3.0.0#data-types

the format property is an open string-valued property, and can have any value. Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification.

The following openapi Doc schema is not successfully validated:

parameters:
   - name: customer_uuid
          in: query
          description: Unique customer identifier to be used for experience customization.
          schema:
            type: string
            format: uuid

The error from the operator:

spec.openapiRef.secretRef: Invalid value: v1.ObjectReference{Kind:"",
        Namespace:"3scale-cand-3", Name:"uberoas3", UID:"", APIVersion:"",
        ResourceVersion:"", FieldPath:""}: invalid paths: parameter
        "customer_uuid" schema is invalid: Unsupported 'format' value 'uuid'

Issue: https://issues.redhat.com/browse/THREESCALE-7642

@codeclimate
Copy link

codeclimate bot commented Feb 1, 2022

Code Climate has analyzed commit c87688b and detected 0 issues on this pull request.

View more on Code Climate.

@eguzki eguzki requested review from MStokluska and KevFan February 1, 2022 10:34
Copy link
Contributor

@KevFan KevFan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good to me 👍

@eguzki eguzki merged commit 7a417e4 into master Feb 4, 2022
@eguzki eguzki deleted the openapi-unsupported-format branch February 4, 2022 12:23
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