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

Not all $ref's are being dereferenced #2

Open
oblakeerickson opened this issue Jan 12, 2017 · 1 comment
Open

Not all $ref's are being dereferenced #2

oblakeerickson opened this issue Jan 12, 2017 · 1 comment

Comments

@oblakeerickson
Copy link
Owner

In this yml file the 'new_category.yml' schema reference isn't being dereferenced, but the response is.

swagger: '2.0'
info:
  title: 'Discourse API Documentation'
  description: |
    Documentation on how to use Discourse through API calls.
  version: latest
host: discourse.example.com
schemes:
  - https
basePath: /
produces:
  - application/json
paths:
  /categories.json:
    get:
      summary: Get a list of categories
      description: |
        The Categories endpoint returns a list of all the categories for
        your discourse site that you have access to.
      parameters: []
      tags:
        - Categories
      responses:
        '200':
          description: |
            A category_list object that contains an array of categories
          schema:
            $ref: 'definitions/categories/categories.yml'
    post:
      description: Create a new category
      parameters:
        - name: name
          in: body
          required: true
          schema:
            $ref: 'definitions/categories/new_category.yml'
      tags:
        - Categories
      responses:
        '200':
          description: category response
          schema:
@oblakeerickson
Copy link
Owner Author

I think it has to do with parameters being an array

parameters : [{"name"=>"name", "in"=>"body", "required"=>true, "schema"=>{"$ref"=>"definitions/categories/new_category.yml"}}]

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

1 participant