Skip to content

feature: added open api merger#19

Merged
adrrf merged 9 commits intomainfrom
feature/7-merge-openapi
Nov 20, 2024
Merged

feature: added open api merger#19
adrrf merged 9 commits intomainfrom
feature/7-merge-openapi

Conversation

@adrrf
Copy link
Copy Markdown
Contributor

@adrrf adrrf commented Nov 17, 2024

This pull request introduces functionality to merge OpenAPI specifications and serve the merged documentation via a Swagger UI. The changes include new dependencies, configuration updates, and the addition of several new functions and modules to handle the OpenAPI merging and serving process.

Dependencies and Configuration:

  • Added openapiv3 and walkdir dependencies to Cargo.toml.
  • Updated config.yaml.example to include docs_path and openapi_path for OpenAPI documentation paths.

New Modules and Functions:

  • Added openapi module to src/config/mod.rs to handle OpenAPI-related functionality.
  • Introduced OpenApiMerger struct in src/config/openapi.rs for merging OpenAPI specifications and generating Swagger UI.
  • Updated src/config/parser.rs to include docs_path and openapi_path in GatewayConfig struct.

Main Application Changes:

  • Imported OpenApiMerger and added merge_openapi_specs function in src/main.rs to merge specs and generate Swagger UI. [1] [2] [3]
  • Added routes in handle_request function to serve OpenAPI spec and Swagger UI.

HTML Template:

  • Added openapi.html template for serving Swagger UI.

@adrrf adrrf self-assigned this Nov 17, 2024
@github-actions github-actions Bot added the 😎 size/m Pull request size M label Nov 17, 2024
@TunixR TunixR requested a review from Copilot November 17, 2024 20:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 7 changed files in this pull request and generated no suggestions.

Files not reviewed (1)
  • config.yaml.example: Language not supported

@adrrf adrrf marked this pull request as ready for review November 18, 2024 17:39
Comment thread openapi.html Outdated
Comment thread src/config/openapi.rs
Comment thread src/main.rs Outdated
@adrrf adrrf merged commit 6201a4a into main Nov 20, 2024
@adrrf adrrf deleted the feature/7-merge-openapi branch November 20, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

😎 size/m Pull request size M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants