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(swagger): Add OpenAPI v3 conversion to update_swagger.sh #201

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

Conversation

rahulsunil2
Copy link

This PR adds functionality to convert Swagger 2.0 (OpenAPI v2) to OpenAPI v3 using api-spec-converter in the update_swagger.sh script.

Description

This PR enhances the update_swagger.sh script by adding the following features:

  1. Conversion of Swagger 2.0 (OpenAPI v2) to OpenAPI v3 using api-spec-converter.
  2. Automatic creation of the output directory for OpenAPI v3 files if it doesn't exist.
  3. Improved error handling and user feedback for the conversion process.
  4. Instructions for installing api-spec-converter if it's not found on the system.

These changes improve the API documentation workflow by providing up-to-date OpenAPI v3 specifications alongside the existing Swagger 2.0 documentation.

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected
  • I have tested the script with both existing and non-existing output directories
  • I have verified that the script handles errors gracefully (e.g., when api-spec-converter is not installed)

Add functionality to convert Swagger 2.0 (OpenAPI v2) to OpenAPI v3 using api-spec-converter.
The script now checks for the existence of the output directory and creates it if necessary.
It also provides appropriate error handling and user feedback for the conversion process.

This change enhances the API documentation workflow by providing up-to-date OpenAPI v3 specifications.
@rahulsunil2
Copy link
Author

This fixes #139

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