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

Closed
wants to merge 2 commits into from
Closed

Traits proposal #1865

wants to merge 2 commits into from

Conversation

darrelmiller
Copy link
Member

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
Copy link
Member Author

Choose a reason for hiding this comment

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

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

@darrelmiller
Copy link
Member Author

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

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

@cmheazel
Copy link
Contributor

@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 OAI/Overlay-Specification#35 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

@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.

@MikeRalphson
Copy link
Member

MikeRalphson commented Jun 17, 2021

As a result of #2604 the filename for this proposal should change to use a dated prefix. Please could you update this PR to match? You can use the original PR date. Apologies for the extra work.

@handrews handrews deleted the traits branch April 18, 2024 18:42
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.

5 participants