-
Notifications
You must be signed in to change notification settings - Fork 138
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
API docs reference resolution #1442
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Create a new test class `OpenAPI31ReferencesTest` for validating OpenAPI 3.1 references. - Implement setup method to initialize the router and load OpenAPI specs. - Update test cases to handle requests for both `/pets` and `/users` endpoints. - Modify the existing OpenAPI specification to include server information in the YAML configuration.
…ptor - Import Json31 from Swagger library - Serialize OpenAPI records to JSON bytes in returnOpenApiAsYaml method - Update XML configuration to reference OpenAPI specification location
- Modify `OpenAPIPublisherInterceptor` to serialize rewritten OpenAPI record to YAML response. - Update `OpenAPIRecordFactory` to create `OpenAPIRecord` using parsed `OpenAPI` objects. - Add `getSpec()` method to convert `OpenAPI` to `JsonNode` for schema retrieval. - Adjust XML configuration to reference OpenAPI specification files correctly.
This pull request needs "/ok-to-test" from an authorized committer. |
Improve the `create` methods in `OpenAPIRecordFactory` by obtaining `OpenAPI` instances before initializing `OpenAPIRecord`. Simplify `getSpec` to accept `OpenAPI` instead of `OpenAPISpec` and streamline JSON conversion.
…actory - Implement tests to verify that Swagger 2.0 descriptions include a conversion notice when transformed to OAS 3.0. - Add a test to ensure that if an existing description is present, the conversion notice is appended without overwriting. - Confirm that OpenAPI 3 specifications do not receive a conversion notice. - Enhance the OpenAPIRecordFactory to check for Swagger 2 format and add the appropriate conversion notice in the API's description upon reading specifications.
Update OpenAPIRecordFactory to use an InputStream for loading OpenAPI specifications instead of a URL. Adjust tests to reflect changes in file names and descriptions for better clarity and consistency.
/ok-to-test |
Note: This OpenAPI description was converted from Swagger 2 to OAS 3 by Membrane API Gateway! |
|
… readability. Update tests to ensure correct description handling and modify HTML overview to display original Swagger version if available.
…ption was converted from Swagger 2 to OAS 3 by the Membrane API Gateway.
predic8
requested changes
Dec 20, 2024
core/src/main/java/com/predic8/membrane/core/openapi/serviceproxy/OpenAPIRecordFactory.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/predic8/membrane/core/openapi/serviceproxy/OpenAPIRecordFactory.java
Outdated
Show resolved
Hide resolved
core/src/test/java/com/predic8/membrane/core/openapi/serviceproxy/OpenAPIRecordFactoryTest.java
Show resolved
Hide resolved
…tests - Remove deprecated methods and tests related to Swagger 2. - Simplify OpenAPI version handling and improve code clarity. - Update OpenAPIUtil to include method for converting OpenAPI to JSON format. - Adjust related tests for OpenAPI 3 compatibility.
predic8
requested changes
Dec 20, 2024
core/src/main/java/com/predic8/membrane/core/openapi/serviceproxy/OpenAPIRecordFactory.java
Outdated
Show resolved
Hide resolved
core/src/main/java/com/predic8/membrane/core/openapi/util/OpenAPIUtil.java
Outdated
Show resolved
Hide resolved
predic8
approved these changes
Dec 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.