Skip to content

Commit cac5cdd

Browse files
committed
Add serverless OpenAPI spec, update README
1 parent bbdf6a6 commit cac5cdd

File tree

4 files changed

+81637
-5816
lines changed

4 files changed

+81637
-5816
lines changed

openapi-converter/clients_schema_to_openapi/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,19 @@ The conversion pipeline is the following:
88
flowchart LR
99
ts[TypeScript API]
1010
schema[schema.json]
11-
openapi[OpenAPI]
11+
schema-no-generics[schema-no-generics.json]
12+
openapi[openapi.json]
1213
1314
ts --> schema
14-
schema --> openapi
15+
schema --> schema-no-generics
16+
schema-no-generics --> openapi
17+
schema-no-generics --> serverless-openapi.json
1518
```
1619

17-
This is still a work in progress and this branch is the work for [PR #2047](https://github.com/elastic/elasticsearch-specification/pull/2047) where reviews and comments should be made.
20+
This branch is the work for [PR #2047](https://github.com/elastic/elasticsearch-specification/pull/2047) where reviews and comments should be made.
1821

1922
The OpenAPI specification generated from the current `schema.json` can be found in the [output/openapi](../../output/openapi) directory.
23+
24+
The generated OpenAPI schemas validate successfully using the rather strict [Spectral OpenAPI linter](https://github.com/stoplightio/spectral), except for endpoint (this is an ES API issue). You can run the linter using:
25+
* `npm run validate` for the Stack/Stateful OpenAPI spec
26+
* `npm run validate-serverless` for the Serverless OpenAPI spec

openapi-converter/clients_schema_to_openapi/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"description": "",
66
"main": "index.js",
77
"scripts": {
8-
"validate": "./node_modules/.bin/spectral lint ../../output/openapi/elasticsearch-openapi.json"
8+
"validate": "./node_modules/.bin/spectral lint ../../output/openapi/elasticsearch-openapi.json",
9+
"validate-serverless": "./node_modules/.bin/spectral lint ../../output/openapi/elasticsearch-serverless-openapi.json"
910
},
1011
"author": "",
1112
"license": "ISC",

0 commit comments

Comments
 (0)