-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Labels
Description
Today, the rest-api-spec is used as an input for generating the schema.json file. In #5295, the schema.json file is used as as the sole source to generate rest-api-spec files, which introduces a cyclic dependency. We'd like to eliminate it.
Here is what needs to change in the compiler to do so.
compiler/src/build-model.ts
- rest-api-spec is the source of truth to list all APIs - we need to add all of them to the Elasticsearch specification.
- compileEndpoints adds the following defaults from rest-api-spec:
- API name, description, docUrl, docTag, extDocUrl, availability/stack, requestBodyRequired, urls, feature flags
Each step also has access to jsonSpec. It's used for:
compiler/src/steps/add-content-type.ts
- headers: accept and content-type
steps/add-description.ts
- default parts description
- default query parameters description
- request description
- endpoint description