CCF icon indicating copy to clipboard operation
CCF copied to clipboard

Add error schema to OpenAPI definition

Open letmaik opened this issue 4 years ago • 0 comments

After https://github.com/microsoft/CCF/pull/1980, all errors follow the OData JSON schema. However, the generated OpenAPI definition doesn't contain the schema for it yet.

As done in Azure services, there are three parts:

  • JSON schema: https://github.com/Azure/azure-rest-api-specs/blob/7b34c62199a8d84f7252dcb8b08c1b593ae65124/specification/storage/data-plane/Microsoft.StorageDataLake/stable/2019-10-31/DataLakeStorage.json#L70-L86
  • Response definition: https://github.com/Azure/azure-rest-api-specs/blob/7b34c62199a8d84f7252dcb8b08c1b593ae65124/specification/storage/data-plane/Microsoft.StorageDataLake/stable/2019-10-31/DataLakeStorage.json#L151-L169
  • Reference of response definition in each endpoint as default response: https://github.com/Azure/azure-rest-api-specs/blob/7b34c62199a8d84f7252dcb8b08c1b593ae65124/specification/storage/data-plane/Microsoft.StorageDataLake/stable/2019-10-31/DataLakeStorage.json#L213-L215

For app endpoints, we should add the default error response if no default is given already.

letmaik avatar Dec 10 '20 11:12 letmaik