Skip to content

Commit

Permalink
Add serverless OpenAPI spec, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
swallez committed Sep 11, 2023
1 parent 7e4eab1 commit 915dd15
Show file tree
Hide file tree
Showing 4 changed files with 81,637 additions and 5,816 deletions.
13 changes: 10 additions & 3 deletions openapi-converter/clients_schema_to_openapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@ The conversion pipeline is the following:
flowchart LR
ts[TypeScript API]
schema[schema.json]
openapi[OpenAPI]
schema-no-generics[schema-no-generics.json]
openapi[openapi.json]
ts --> schema
schema --> openapi
schema --> schema-no-generics
schema-no-generics --> openapi
schema-no-generics --> serverless-openapi.json
```

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.
This branch is the work for [PR #2047](https://github.com/elastic/elasticsearch-specification/pull/2047) where reviews and comments should be made.

The OpenAPI specification generated from the current `schema.json` can be found in the [output/openapi](../../output/openapi) directory.

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:
* `npm run validate` for the Stack/Stateful OpenAPI spec
* `npm run validate-serverless` for the Serverless OpenAPI spec
3 changes: 2 additions & 1 deletion openapi-converter/clients_schema_to_openapi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"description": "",
"main": "index.js",
"scripts": {
"validate": "./node_modules/.bin/spectral lint ../../output/openapi/elasticsearch-openapi.json"
"validate": "./node_modules/.bin/spectral lint ../../output/openapi/elasticsearch-openapi.json",
"validate-serverless": "./node_modules/.bin/spectral lint ../../output/openapi/elasticsearch-serverless-openapi.json"
},
"author": "",
"license": "ISC",
Expand Down
Loading

0 comments on commit 915dd15

Please sign in to comment.