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

Callback examples is (still) not valid #1375

Closed
andylowry opened this issue Oct 16, 2017 · 3 comments
Closed

Callback examples is (still) not valid #1375

andylowry opened this issue Oct 16, 2017 · 3 comments

Comments

@andylowry
Copy link
Contributor

In his comment on #1228, @whitlockjc writes:

Replaces lines 1-4 with # ... (this will be our way to indicate "omitted for brevity")

This was a suggestion to remove the openapi and info properties from the model, which suggestion was followed.

I'd argue that this is approach achieves a false economy. The brevity gain is all of four lines. And it rules out a valuable potential use-case for the example (one I'm using, but I have to blacklist this example), namely: using the examples in the repo's master branch as live data for tests in OAI tooling projects.

If folks concur, I'm glad to do a PR restoring the omitted lines.

@darrelmiller
Copy link
Member

We should definitely make a distinction between examples that are complete and those that are just fragments. I'm not sure we want to completely outlaw fragment examples, but they should be identifiable.

andylowry added a commit to RepreZen/OpenAPI-Specification that referenced this issue Oct 16, 2017
@andylowry
Copy link
Contributor Author

Thanks @darrelmiller I agree, and I'd suggest two relevant guidelines:

  1. The complete examples and fragment examples should be kept in separate directories, rather than (only) making the distinction visible in the files themselves. This will make my use-case easier for me and anyone else who wants to do something similar.

  2. fragments that can be made complete by adding one or more of the following should be completed rather than being left as fragments:

    • openapi property
    • minimal info property
    • empty paths property

I've just submitted PR #1376 to complete the callback example.

@MikeRalphson
Copy link
Member

#1376 was merged. Thanks all.

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

No branches or pull requests

3 participants