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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Bug in server variable validation in 3.1 #257

Conversation

psalaberria002
Copy link

@psalaberria002 psalaberria002 commented Apr 24, 2024

Validation for server variables isn't working as expected.

The description field should be allowed.

  1) Invalid APIs (specification validation)
       components / definitions
         should allow a component schema name that contains hyphens
           OpenAPI 3.1:
     SyntaxError: OpenAPI schema validation failed.

UNEVALUATED PROPERTY must NOT have unevaluated properties

  14 |             "b"
  15 |           ],
> 16 |           "description": "xxx path param for the server url",
     |           ^^^^^^^^^^^^^ 馃槻  description is not expected to be here!
  17 |           "default": "a"
  18 |         }
  19 |       }
      at validateSchema (lib/validators/schema.js:96:15)
      at OpenAPIParser.validate (lib/index.js:160:7)

I am not familiar with the codebase. Hopefully this is easy to fix.

@erunion any ideas?

@psalaberria002 psalaberria002 changed the title Ps/description in server vars feat: Bug in server variable validation in 3.1 Apr 24, 2024
@kanadgupta kanadgupta self-requested a review May 3, 2024 01:40
@darrenyong
Copy link

hey there @psalaberria002, apologies for the delay here! we have a fix queued up in #259 so hope to get it out soon. I'll reach out again when it hits prod 馃槃

@erunion
Copy link
Member

erunion commented May 28, 2024

馃憢 @darrenyong and @kanadgupta got a fix together for this in v2.6.0, which should be hitting ReadMe and rdme later this week

@erunion erunion closed this May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants