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

Traits proposal #1865

Open
wants to merge 2 commits into
base: master
from
Open

Traits proposal #1865

wants to merge 2 commits into from

Conversation

@darrelmiller
Copy link
Member

darrelmiller commented Mar 14, 2019

To improve the process around working on the traits feature, the contents of the Overlay issue have been moved into a markdown file that lives in the proposals folder in the master branch. The goal is to bring this document to the point where it can be copied and pasted into the official spec when finalized.

@darrelmiller darrelmiller changed the title Traits feature Traits proposal Mar 14, 2019
@darrelmiller
Copy link
Member Author

darrelmiller commented Mar 14, 2019

  • Decide on the name.
  • Decided : Mixin references should be array of JSON references
  • Merging rules as defined here https://github.com/OAI/OpenAPI
  • Specification/issues/1442#issuecomment-418549259 by @jstoiko (Array merging semantics instead)
get:
description: search for foo resources
$mixin:
- pagable

This comment has been minimized.

@darrelmiller

darrelmiller Mar 14, 2019 Author Member

This should be a JSON ref, not just a simple string.

@darrelmiller
Copy link
Member Author

darrelmiller commented Mar 14, 2019

We need to collect a set of use cases for internal vs external "overlay/trait/mixin/whatever". @tedepstein volunteered to help.

@cmheazel
Copy link
Contributor

cmheazel commented Mar 14, 2019

Yes, we will do the same thing with Alternative Schema.

@cmheazel
Copy link
Contributor

cmheazel commented Mar 14, 2019

@darrelmiller where will the use cases live? Should we have discrete directories for each proposal? That way we don't have to include use cases and other supporting material in the markup targeted for the OAS spec.

@earth2marsh
Copy link
Member

earth2marsh commented Mar 14, 2019

Regarding use cases, there were a few from #1442 I'll bring over here:

  1. As a way to keep any implementation details for a spec separate from the consumer-oriented doc, such as API management concerns from the API provider's perspective, for example attaching a policy to an operation.
  2. To allow a writer to create better descriptions/summaries/titles for attributes like a parameter or an operation without having to edit the spec itself. But since parameters are an array, in order to edit a single description, I would have to reproduce the entire array, no? Is there a way to more precisely target?
  3. To identify an SLA. You might have a valid spec that doesn't have that information, but you could ask for the SLA variant for that spec.
  4. Codegen is another, as we're polluting specs with metadata for codegen. This gives us a way to separate that out.
@darrelmiller
Copy link
Member Author

darrelmiller commented Mar 14, 2019

@cmheazel I was considering the use cases as living in the comments here, but I see your point that it is going to get just as messy. Perhaps each proposal should have a folder and the spec wording and all related documents, e.g. examples, use cases, spec wording should all live in that folder.

Having a permenant record of why we created a feature is definitely not a bad thing.

@darrelmiller darrelmiller added this to In progress in OpenAPI Spec Work Apr 18, 2019
@darrelmiller darrelmiller removed this from In Review in OpenAPI Spec Work Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.