Skip to content

The JSON spec parser should support the new format #46744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
delvedor opened this issue Sep 16, 2019 · 1 comment · Fixed by #46872
Closed

The JSON spec parser should support the new format #46744

delvedor opened this issue Sep 16, 2019 · 1 comment · Fixed by #46872
Labels
:Core/Infra/REST API REST infrastructure and utilities

Comments

@delvedor
Copy link
Member

While working on #46522, @polyfractal has discovered that the parsing for _common.json assumes there is only one object to parse, while the new spec format there are two objects.

The parser needs to be updated to adopt the new structure of the JSON spec.
Following, the difference between the old format and the new one.

-  "description": "Parameters that are accepted by all API endpoints.",
-  "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html",
+  "documentation": {
+    "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html",
+    "description": "Parameters that are accepted by all API endpoints."
+  },

cc @Mpdreamz

@delvedor delvedor added the :Core/Infra/REST API REST infrastructure and utilities label Sep 16, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

javanna added a commit to javanna/elasticsearch that referenced this issue Sep 23, 2019
API spec now use an object for the documentation field. _common was not updated yet. This commit updates _common.json and its corresponding parser.

Closes elastic#46744
javanna added a commit that referenced this issue Sep 23, 2019
API spec now use an object for the documentation field. _common was not updated yet. This commit updates _common.json and its corresponding parser.

Closes #46744

Co-Authored-By: Tomas Della Vedova <[email protected]>
javanna added a commit that referenced this issue Sep 23, 2019
API spec now use an object for the documentation field. _common was not updated yet. This commit updates _common.json and its corresponding parser.

Closes #46744

Co-Authored-By: Tomas Della Vedova <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/REST API REST infrastructure and utilities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants