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

6.0.0 #1447

Merged
merged 5 commits into from
Dec 30, 2024
Merged

6.0.0 #1447

merged 5 commits into from
Dec 30, 2024

Conversation

predic8
Copy link
Member

@predic8 predic8 commented Dec 30, 2024

No description provided.

github-actions bot and others added 5 commits December 19, 2024 12:34
Co-authored-by: github-actions <[email protected]>
Co-authored-by: github-actions <[email protected]>
…1440)

* Add OpenAPI 3.1 references test class and update router setup

- 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.

* Added GraphQL Example

* Add test for nested mutations exceeding limit in GraphQLProtectionInterceptorTest

* Refactor GraphQL mutation counting logic and improve test naming

- Enhance `countMutations` method by creating a new private method `getMutationOperations` for better clarity and functionality.
- Update test method names in `GraphQLProtectionInterceptorTest` class to follow concise naming conventions without 'public' and 'static' keywords.
- Remove redundant test case for counting three mutations as it is replaced by more comprehensive tests.

---------

Co-authored-by: Thomas Bayer <[email protected]>
* Add OpenAPI 3.1 references test class and update router setup

- 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.

* Add JSON serialization for OpenAPI records in OpenAPIPublisherInterceptor

- Import Json31 from Swagger library
- Serialize OpenAPI records to JSON bytes in returnOpenApiAsYaml method
- Update XML configuration to reference OpenAPI specification location

* Refactor OpenAPI record creation and YAML response handling

- 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.

* Add OpenAPI YAML reference and update JSON serialization in OpenAPIRecordFactory

* Refactor OpenAPIRecord creation to streamline parameters in OpenAPIRecord constructor

* Refactor OpenAPIRecord creation to use OpenAPI objects directly

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.

* Add tests for Swagger 2 conversion notices and enhance OpenAPIRecordFactory

- 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.

* Refactor OpenAPIRecordFactory to improve resource handling

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.

* Refactor OpenAPIRecord creation to reduce duplicate calls and improve readability. Update tests to ensure correct description handling and modify HTML overview to display original Swagger version if available.

* Update the note in the OpenAPI description to clarify that the description was converted from Swagger 2 to OAS 3 by the Membrane API Gateway.

* Refactor OpenAPI handling by removing Swagger 2 support and updating 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.

* Tests

* Tests

* Refactor OpenAPIRecordFactory to streamline OpenAPIRecord creation

---------

Co-authored-by: Thomas Bayer <[email protected]>
@membrane-ci-server
Copy link

This pull request needs "/ok-to-test" from an authorized committer.

@predic8 predic8 marked this pull request as ready for review December 30, 2024 22:49
@predic8 predic8 merged commit 1471296 into 6-0-0-flow-without-stack Dec 30, 2024
4 of 6 checks passed
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.

2 participants