- Home
- API Enriched
- Api
- config
- Suggest Open API specification validation rule.
Suggest Open API specification validation rule.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/config/namespaces/example/api_sec/rule_suggestion/oas_validation';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"api_groups":["example"],"method":"ANY","namespace":"example","path":"example","virtual_host_name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/config/namespaces/example/api_sec/rule_suggestion/oas_validation \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "api_groups": [ "example" ], "method": "ANY", "namespace": "example", "path": "example", "virtual_host_name": "example" }'Suggest Open API specification validation rule for a given path.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace x-required Namespace of the App type for current request.
Request Bodyrequired
Section titled “Request Bodyrequired”GET suggested Open API specification validation for a given path.
object
List of API Groups the API Endpoint is a member of.
Namespace of the App type for current request Required: YES.
Path to apply the Open API specification validation to Required: YES.
Virtual Host for which this Open API specification validation rule applied Required: YES.
Responses
Section titled “Responses”A successful response.
GET suggested Open API specification validation for a given path.
object
object
object
object
object
Required: YES.
Fall Through Rule for a specific endpoint, base-path, or API group.
object
object
object
object
object
Methods to be matched.
Path to be matched Required: YES.
Exclusive with [api_endpoint base_path] The API group which this validation applies to.
Exclusive with [api_endpoint api_group] The base path which this validation applies to.
object
Human readable description.
This is the name of the message. The value of name has to follow DNS-1035 format. Required: YES.
X-displayName: “Disable” A value of true will administratively disable the object that corresponds to the containing message.
object
object
object
object
object
object
object
object
object
object
object
object
List of properties of the response to validate according to the OpenAPI specification file (a.k.a. Swagger)
Required: YES.
object
object
object
object
object
List of properties of the request to validate according to the OpenAPI specification file (a.k.a. Swagger)
Required: YES.
object
object
object
Methods to be matched.
Path to be matched Required: YES.
Exclusive with [api_endpoint base_path] The API group which this validation applies to.
Exclusive with [api_endpoint api_group] The base path which this validation applies to.
object
Human readable description.
This is the name of the message. The value of name has to follow DNS-1035 format. Required: YES.
X-displayName: “Disable” A value of true will administratively disable the object that corresponds to the containing message.
Exclusive with [any_domain] The rule will apply for a specific domain.
object
object
object
object
List of properties of the response to validate according to the OpenAPI specification file (a.k.a. Swagger)
Required: YES.
object
object
object
object
object
List of properties of the request to validate according to the OpenAPI specification file (a.k.a. Swagger)
Required: YES.
object
Example
{ "all_endpoints_oas_validation": { "fall_through_mode": { "fall_through_mode_custom": { "open_api_validation_rules": [ { "api_endpoint": { "methods": [ "ANY" ] } } ] } }, "validation_mode": { "response_validation_mode_active": { "response_validation_properties": [ "PROPERTY_QUERY_PARAMETERS" ] }, "validation_mode_active": { "request_validation_properties": [ "PROPERTY_QUERY_PARAMETERS" ] } } }, "custom_oas_validation": { "api_endpoint": { "methods": [ "ANY" ] }, "validation_mode": { "response_validation_mode_active": { "response_validation_properties": [ "PROPERTY_QUERY_PARAMETERS" ] }, "validation_mode_active": { "request_validation_properties": [ "PROPERTY_QUERY_PARAMETERS" ] } } }, "loadbalancer_type": "VIRTUAL_SERVICE"}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example