public final class AwsRestJson1Protocol
extends java.lang.Object
aws.protocols#restJson1 protocol to OpenAPI.OpenApiProtocol.Operation| Constructor and Description |
|---|
AwsRestJson1Protocol() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<OpenApiProtocol.Operation> |
createOperation(Context<T> context,
OperationShape operation)
Creates an operation entry, including the method, URI, and operation
object builder.
|
protected java.lang.String |
getEventStreamMediaType(Context<T> context,
EventStreamInfo info)
Gets the media type of an event stream for the protocol.
|
java.util.Set<java.lang.String> |
getProtocolRequestHeaders(Context<RestJson1Trait> context,
OperationShape operationShape)
Gets the unmodeled protocol-specific HTTP headers of a request that are
considered significant for the provided operation.
|
java.util.Set<java.lang.String> |
getProtocolResponseHeaders(Context<RestJson1Trait> context,
OperationShape operationShape)
Gets the unmodeled protocol-specific HTTP headers of a response that
are considered significant for the provided operation.
|
java.lang.Class<RestJson1Trait> |
getProtocolType()
Gets the protocol type that this converter handles.
|
void |
updateDefaultSettings(Model model,
OpenApiConfig config)
Sets protocol-specific default values on the OpenAPI configuration
object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetOperationMethod, getOperationResponseStatusCode, getOperationUripublic java.lang.Class<RestJson1Trait> getProtocolType()
OpenApiProtocolpublic java.util.Set<java.lang.String> getProtocolRequestHeaders(Context<RestJson1Trait> context, OperationShape operationShape)
OpenApiProtocolThese protocol specific headers are not automatically added to requests, but are used when integrating with things like CORS.
getProtocolRequestHeaders in interface OpenApiProtocol<RestJson1Trait>context - OpenAPI contextoperationShape - Smithy operationpublic java.util.Set<java.lang.String> getProtocolResponseHeaders(Context<RestJson1Trait> context, OperationShape operationShape)
OpenApiProtocolThese protocol specific headers are not automatically added to responses, but are used when integrating with things like CORS.
getProtocolResponseHeaders in interface OpenApiProtocol<RestJson1Trait>context - OpenAPI contextoperationShape - Smithy operationpublic void updateDefaultSettings(Model model, OpenApiConfig config)
OpenApiProtocolmodel - Model being converted.config - Configuration object to modify.public java.util.Optional<OpenApiProtocol.Operation> createOperation(Context<T> context, OperationShape operation)
OpenApiProtocolThe operation is returned as an empty Optional if the operation is
not supported by the protocol. This method should make calls to
OpenApiProtocol.getOperationUri(software.amazon.smithy.openapi.fromsmithy.Context<T>, software.amazon.smithy.model.shapes.OperationShape) and OpenApiProtocol.getOperationMethod(software.amazon.smithy.openapi.fromsmithy.Context<T>, software.amazon.smithy.model.shapes.OperationShape) when creating
the Operation object.
createOperation in interface OpenApiProtocol<T extends Trait>context - The build context.operation - The operation shape to create.protected java.lang.String getEventStreamMediaType(Context<T> context, EventStreamInfo info)
By default, this method returns the binary AWS event stream
media type, application/vnd.amazon.eventstream.
context - Conversion context.info - Event stream info to provide the media type for.