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

Example in Response Not Used #4610

Closed
dgrahn opened this issue May 31, 2018 · 4 comments
Closed

Example in Response Not Used #4610

dgrahn opened this issue May 31, 2018 · 4 comments

Comments

@dgrahn
Copy link

dgrahn commented May 31, 2018

Q&A

  • OS: Windows 10
  • Browser: Chrome
  • Version: 66
  • Method of installation: website and npm
  • Swagger-UI version: 3.14.2
  • Swagger/OpenAPI version: OpenAPI 3.0.1

Content & configuration

Example Swagger/OpenAPI definition:

openapi: 3.0.1
info:
  version: 1.0.0
  title: Example of Bug
paths:
  '/':
    get:
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MySchema'
              example:
                a: asdf
                b: 1234
components:
  schemas:
    MySchema:
      type: object
      properties:
        a: 
          type: string
        b:
          type: number

Describe the bug you're encountering

The example listed in the response is not used.

To reproduce...

Steps to reproduce the behavior:

  1. Go to https://editor.swagger.io/
  2. Copy and paste the above schema.
  3. Navigate to the '/' endpoint.
  4. See error, no example

Expected behavior

The example should be used.

@hkosova
Copy link
Contributor

hkosova commented May 31, 2018

Thanks for the report! This issue is being tracked in #3437.

@dgrahn
Copy link
Author

dgrahn commented May 31, 2018

Looks like this should have been fixed a long time ago. The number of open issues on this project is a little disturbing.

Do you have a contribution guide?

@shockey
Copy link
Contributor

shockey commented Jun 2, 2018

Looks like this should have been fixed a long time ago.

Yeah, looks like the issue was tagged in a milestone, which we stopped actively using a while ago.

We track statuses in a private GitHub project now - FYI, that issue is currently 10th on our "next items to work on" board. I've removed the stale milestone marker, to avoid confusion.

The number of open issues on this project is a little disturbing.

As an open-source project, our bandwidth is limited - I'm the only code maintainer of this project along with Swagger-Client and Swagger-Editor.

We do our best, as our 2,900 closed issues indicate 🙂

Do you have a contribution guide?

Yes! See CONTRIBUTING.md. We also have unit and integration tests, as well as an ESLint configuration to guide you as you make changes.

If you have any specific questions, feel free to send me an email (address in profile) or send me a PM on Gitter.


I'm going to close this as a duplicate, but I'm happy to continue discussion here.

@shockey shockey closed this as completed Jun 2, 2018
@lock
Copy link

lock bot commented Jul 1, 2019

Locking due to inactivity.
This is done to avoid resurrecting old issues and bumping long threads with new, possibly unrelated content.
If you think you're experiencing something similar to what you've found here: please open a new issue, follow the template, and reference this issue in your report.
Thanks!

@lock lock bot locked and limited conversation to collaborators Jul 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants