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

Add visibility the to rest-spec-api #56104

Merged
merged 8 commits into from
Dec 14, 2020

Conversation

Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented May 4, 2020

This documents API's intended exposure to the outside world under a new key visibility:

  • private, API is not exposed on clients
  • feature_flag API is exposed on clients but clients can emit documentation on the fact its not available OOTB.
  • public, the API is publicly available in distributions.

If an API has visibility: feature_flag it also needs to document the feature flag its behind under feature_flag: "es.___". ClientYamlSuiteRestApiParser.java is updated to reflect this requirement.

visibility does not replace stability as that only documents the state of development for the API. An experimental API can be public and stable API's can be behind a feature_flag. There are currently no restrictions on this.

Relates to #54664 (comment) where new API's have come in that are fully intended to be private. As well as several API's coming in that are behind feature_flags.

When stability was introduced in #38413 (comment) we decided to hold of on private. I feel the API has changed significantly since to reconsider this decision.

@Mpdreamz Mpdreamz added the :Core/Infra/REST API REST infrastructure and utilities label May 4, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/REST API)

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label May 4, 2020
@Mpdreamz Mpdreamz added the Team:Clients Meta label for clients team label May 4, 2020
@rjernst
Copy link
Member

rjernst commented May 4, 2020

It is still unclear to me why private would be necessary. Since the spec files define the public api, which the client uses, why would we add something there that is not for public consumption? The linked example security issue doesn't seem private to me: it is documented, so why would we not want it included with our clients?

@Mpdreamz Mpdreamz force-pushed the feature/rest-spec-visibility branch from 49cb189 to 8d09e42 Compare August 5, 2020 13:11
@Mpdreamz Mpdreamz force-pushed the feature/rest-spec-visibility branch 3 times, most recently from dd3e52e to b441fec Compare December 10, 2020 13:30
@rjernst
Copy link
Member

rjernst commented Dec 10, 2020

After some further thought, I think the advantages of having all our APIs included in the spec, even for internal uses, is valuable so that we can validate we have not missing any specs. LGTM.

This documents API intended exposure to the outside world.

* `private`, API is not exposed on clients
* `feature_flag` API is exposed on clients but clients can emit
documentation on the fact its not available OOTB.
* `public`, the API is publicly available in distributions.

`visibility` does not replace `stability` as that only documents the
state of development for the API. An `experimental` API can be `public`
and `stable` API's can be behind a `feature_flag`. There are currently
no restrictions on this.
@Mpdreamz Mpdreamz force-pushed the feature/rest-spec-visibility branch from 996e842 to 8c8ab07 Compare December 14, 2020 10:31
@Mpdreamz Mpdreamz merged commit e31e3de into elastic:master Dec 14, 2020
@Mpdreamz Mpdreamz deleted the feature/rest-spec-visibility branch December 14, 2020 11:23
Mpdreamz added a commit to Mpdreamz/elasticsearch that referenced this pull request Dec 15, 2020
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 Team:Clients Meta label for clients team Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants