Skip to content
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

Update rest API specs #54252

Merged
merged 5 commits into from
Apr 2, 2020
Merged

Update rest API specs #54252

merged 5 commits into from
Apr 2, 2020

Conversation

russcam
Copy link
Contributor

@russcam russcam commented Mar 26, 2020

This commit updates the rest API specs to validate against a JSON schema for the specifications. Most updates are to add a description, whilst others fix typos and unify conventions e.g. deprecations, descriptions, urls starting with /.

/cc @elastic/es-clients

This commit updates the rest API specs to validate against a
JSON schema for the specifications. Most updates are to add
a description, whilst others fix typos and unify conventions
e.g. deprecations, descriptions, urls starting with /.
@javanna
Copy link
Member

javanna commented Mar 26, 2020

heya @russcam would it make sense to include the schema validation (which I assume you ran locally) in our build so we can keep the spec in a good state for the time being?

@mark-vieira mark-vieira self-requested a review March 26, 2020 23:08
@russcam
Copy link
Contributor Author

russcam commented Mar 26, 2020

Yes @javanna. Spoke with @mark-vieira about possibility of including validation in the build, and will open an issue shortly to discuss.

In the meantime, I'll add the schema used to this PR

This commit adds a JSON schema for rest api specs.
The schema conforms to draft-07 schema.
rest-api-spec/schema.json Outdated Show resolved Hide resolved
@mark-vieira mark-vieira requested review from jakelandis and removed request for mark-vieira March 27, 2020 16:04
@mark-vieira
Copy link
Contributor

@jakelandis I've added you as a reviewer here since you've been involved in this REST spec stuff a lot lately.

@russcam
Copy link
Contributor Author

russcam commented Mar 29, 2020

Thanks for the review @jakelandis. I've address the version regex pattern and location of schema.json in the solution

Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@russcam
Copy link
Contributor Author

russcam commented Apr 1, 2020

Looking to merge this in. Any objections to backporting to 7.x?

@mark-vieira
Copy link
Contributor

Looking to merge this in. Any objections to backporting to 7.x?

No, indeed please do and if possible the 7.7 and 7.6 branches as well if it's reasonable. The reason for this is by default all build-related changes are backported to all active branches (except 6.8, it's too far gone). By doing this across the board it makes it much easier to manage build and CI when most or all active branches are extremely similar. Since the rest validation stuff touches the build, and this is a prerequisite to that, we'll need this done in every branch we intend to add the validator to.

@russcam
Copy link
Contributor Author

russcam commented Apr 1, 2020

Thanks @mark-vieira, merging this in now and will backport to 7.x, 7.7 and 7.6

@russcam
Copy link
Contributor Author

russcam commented Apr 1, 2020

@elasticmachine update branch

@russcam russcam merged commit da37e01 into elastic:master Apr 2, 2020
russcam added a commit that referenced this pull request Apr 2, 2020
This commit updates the rest API specs to validate against a
JSON schema for the specifications. Most updates are to add
a description, whilst others fix typos and unify conventions
e.g. deprecations, descriptions, urls starting with /. The schema
conforms to draft-07 JSON schema.

(cherry picked from commit da37e01)
russcam added a commit that referenced this pull request Apr 2, 2020
This commit updates the rest API specs to validate against a
JSON schema for the specifications. Most updates are to add
a description, whilst others fix typos and unify conventions
e.g. deprecations, descriptions, urls starting with /. The schema
conforms to draft-07 JSON schema.

(cherry picked from commit da37e01)
russcam added a commit that referenced this pull request Apr 2, 2020
This commit updates the rest API specs to validate against a
JSON schema for the specifications. Most updates are to add
a description, whilst others fix typos and unify conventions
e.g. deprecations, descriptions, urls starting with /. The schema
conforms to draft-07 JSON schema.

(cherry picked from commit da37e01)
@russcam russcam deleted the rest-spec-validation branch April 2, 2020 01:50
jakelandis added a commit to jakelandis/elasticsearch that referenced this pull request Apr 13, 2020
A JSON schema was recently introduced for the REST API specification. elastic#54252
This PR introduces a 3rd party validation tool to ensure that the
REST specification conforms the schema.

The task is applied to the 3 projects that contain REST API specifications.
The plugin wires this task into the precommit commit task, and should be
considered as part of the public API for the build tools for any plugin
developer to contribute their plugin's specification.

An ignore parameter has been introduced for the task to allow specific
file to be ignored from the validation. The ignored files in this PR
will soon get issues logged and a link so they can be fixed.

Closes elastic#54314
jakelandis added a commit that referenced this pull request Apr 21, 2020
A JSON schema was recently introduced for the REST API specification. #54252
This PR introduces a 3rd party validation tool to ensure that the
REST specification conforms to the schema.

The task is applied to the 3 projects that contain REST API specifications.
The plugin wires this task into the precommit commit task, and should be
considered as part of the public API for the build tools for any plugin
developer to contribute their plugin's specification.

An ignore parameter has been introduced for the task to allow specific
file to be ignored from the validation. The ignored files in this PR
will soon get issues logged and a link so they can be fixed.

Closes #54314
jakelandis added a commit to jakelandis/elasticsearch that referenced this pull request Apr 21, 2020
A JSON schema was recently introduced for the REST API specification. elastic#54252
This PR introduces a 3rd party validation tool to ensure that the
REST specification conforms to the schema.

The task is applied to the 3 projects that contain REST API specifications.
The plugin wires this task into the precommit commit task, and should be
considered as part of the public API for the build tools for any plugin
developer to contribute their plugin's specification.

An ignore parameter has been introduced for the task to allow specific
file to be ignored from the validation. The ignored files in this PR
will soon get issues logged and a link so they can be fixed.

Closes elastic#54314
jakelandis added a commit to jakelandis/elasticsearch that referenced this pull request Apr 21, 2020
A JSON schema was recently introduced for the REST API specification. elastic#54252
This PR introduces a 3rd party validation tool to ensure that the
REST specification conforms to the schema.

The task is applied to the 3 projects that contain REST API specifications.
The plugin wires this task into the precommit commit task, and should be
considered as part of the public API for the build tools for any plugin
developer to contribute their plugin's specification.

An ignore parameter has been introduced for the task to allow specific
file to be ignored from the validation. The ignored files in this PR
will soon get issues logged and a link so they can be fixed.

Closes elastic#54314
jakelandis added a commit that referenced this pull request Apr 22, 2020
A JSON schema was recently introduced for the REST API specification. #54252
This PR introduces a 3rd party validation tool to ensure that the
REST specification conforms to the schema.

The task is applied to the 3 projects that contain REST API specifications.
The plugin wires this task into the precommit commit task, and should be
considered as part of the public API for the build tools for any plugin
developer to contribute their plugin's specification.

An ignore parameter has been introduced for the task to allow specific
file to be ignored from the validation. The ignored files in this PR
will soon get issues logged and a link so they can be fixed.

Closes #54314
jakelandis added a commit that referenced this pull request Apr 22, 2020
A JSON schema was recently introduced for the REST API specification. #54252
This PR introduces a 3rd party validation tool to ensure that the
REST specification conforms to the schema.

The task is applied to the 3 projects that contain REST API specifications.
The plugin wires this task into the precommit commit task, and should be
considered as part of the public API for the build tools for any plugin
developer to contribute their plugin's specification.

An ignore parameter has been introduced for the task to allow specific
file to be ignored from the validation. The ignored files in this PR
will soon get issues logged and a link so they can be fixed.

Closes #54314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants