Interface SpecRestApiProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, RestApiBaseProps
All Known Implementing Classes:
SpecRestApiProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:11.941Z") @Stability(Stable) public interface SpecRestApiProps extends software.amazon.jsii.JsiiSerializable, RestApiBaseProps
Props to instantiate a new SpecRestApi.

Example:

 Integration integration;
 SpecRestApi api = SpecRestApi.Builder.create(this, "books-api")
         .apiDefinition(ApiDefinition.fromAsset("path-to-file.json"))
         .build();
 Resource booksResource = api.root.addResource("books");
 booksResource.addMethod("GET", integration);
 
  • Method Details

    • getApiDefinition

      @Stability(Stable) @NotNull ApiDefinition getApiDefinition()
      An OpenAPI definition compatible with API Gateway.

      See Also:
    • getMinCompressionSize

      @Stability(Stable) @Nullable default Size getMinCompressionSize()
      A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (when undefined) on an API.

      When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

      Default: - Compression is disabled.

    • builder

      @Stability(Stable) static SpecRestApiProps.Builder builder()
      Returns:
      a SpecRestApiProps.Builder of SpecRestApiProps