Bases: Enum
infused
Example:
# api: apigateway.RestApi # We define the JSON Schema for the transformed valid response response_model = api.add_model("ResponseModel", content_type="application/json", model_name="ResponseModel", schema=apigateway.JsonSchema( schema=apigateway.JsonSchemaVersion.DRAFT4, title="pollResponse", type=apigateway.JsonSchemaType.OBJECT, properties={ "state": apigateway.JsonSchema(type=apigateway.JsonSchemaType.STRING), "greeting": apigateway.JsonSchema(type=apigateway.JsonSchemaType.STRING) } ) ) # We define the JSON Schema for the transformed error response error_response_model = api.add_model("ErrorResponseModel", content_type="application/json", model_name="ErrorResponseModel", schema=apigateway.JsonSchema( schema=apigateway.JsonSchemaVersion.DRAFT4, title="errorResponse", type=apigateway.JsonSchemaType.OBJECT, properties={ "state": apigateway.JsonSchema(type=apigateway.JsonSchemaType.STRING), "message": apigateway.JsonSchema(type=apigateway.JsonSchemaType.STRING) } ) )
Attributes
In API Gateway models are defined using the JSON schema draft 4.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4