ves-io-schema-views-api_definition-API-Replace

Examples of replacing api_definition

Usecase:

Replace API Definition Object

Request using vesctl:

vesctl configuration replace api_definition -i api_definition.yaml

where file apidefinition.yaml has following contents (apidefinition.ReplaceRequest):

metadata:
  name: api-definition-1
  namespace: shared
spec:
  swaggerSpecs:
  - /api/object_store/namespaces/shared/stored_objects/swagger/spec-1/v1-21-10-19

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"api-definition-1","namespace":"shared"},"spec":{"swaggerSpecs":["/api/object_store/namespaces/shared/stored_objects/swagger/spec-1/v1-21-10-19"]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build038462651_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/shared/api_definitions/api-definition-1'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 12 Jan 2022 14:51:30 GMT
Vary: Accept-Encoding

{

}