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

feat(openapi): tooling upgrades #1126

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

erunion
Copy link
Member

@erunion erunion commented Dec 21, 2024

🧰 Changes

This upgrades our oas and oas-normalize tooling to their latest releases. Included in this work are a couple new features to and refactors to some commands:

openapi

The .validate() call within oas-normalize has been refactored to no longer do conversion and validation, the conversion side has been split off to a new .convert() method.

As part of this change the previous convertToLatest parameter that .validate() accepted for converting Swagger definitions to OpenAPI no longer exists anywhere. We had this configurable within some internal methods within rdme but it was never exposed, and converting Swagger to OpenAPI has always been the default behavior throughout rdme.

openapi inspect

Our analyzer tool can now surface information on if an API definition utilizes common parameters.1

I have also removed our dependency on pluralize because we were only loading it to pluralize three strings: "media type", "operation", and "security type". Because these can be easily pluralized with a one-liner we don't really need to import a wholeass library to do this.

Footnotes

  1. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#path-item-object

@erunion erunion added enhancement New feature or request dependencies Pull requests that update a dependency file command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands labels Dec 21, 2024
@erunion erunion requested a review from kanadgupta December 21, 2024 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant