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.
Refactor OpenAPI to use traits & inline schemas
This updates the OpenAPI converter to deal with how the JSON schema
converter is now automatically inlining different types of members.
The produced artifacts are basically the same as the previously produced
"inlined" OpenAPI shemas. One major change is that previously numbers
were never inlined due to a bug.
The conversion is now generically typed based on the protocol trait being
converted. This gives access to any protocol configuration data. Auth scheme
conversion is now generically typed based on the auth trait too, also giving
access to auth scheme trait configuration data. These two changes required
some moderate changes to various APIs.
Various cleanup and readability changes were made to the protocol conversion
code. However, this should not have affected the output.
Ensure that schemaDocumentExtensions are added
Use $ref for request/response OpenAPI contents
We previously generated inline schemas for the contents (document
bindings) of requests and responses. This resulted in randomly generated
schemas in some tools like API Gateway. This change now adds the ability
to "synthesize" shapes during the conversion so that we can now generate
schemas for these cases.
This change also detected and fixed a bug where the headers of an
operations's response were being used when generating errors responses
rather than the header bindings on the error.
Add more context to OpenAPI mappers and fix CORS
This commit adds more contextual information that might be relevant to
different OpenAPI mapper methods, including the HTTP method and path
associated with what's being mapped over. Further, this gives more
context to the CORS integration for API Gateway to ensure that headers
are only added for the appropriate type of request (preflight vs CORS
request).
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.