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

Accept tags for operations from parent contexts #29

Merged
merged 1 commit into from
Mar 16, 2017
Merged

Accept tags for operations from parent contexts #29

merged 1 commit into from
Mar 16, 2017

Conversation

drewish
Copy link
Owner

@drewish drewish commented Mar 16, 2017

RSpec.describe "Sample Requests", type: :request, tags: [:context_tag] do
  path '/posts', tags: ['path_tag'] do
    operation "GET", summary: "fetch list" do
      produces 'application/json'
      tags 'operation_tag'

      response(200, {description: "successful"})
    end
  end
end

Would produce:

{
  "swagger": "2.0",
  "info": {
    "title": "API V1",
    "version": "v1"
  },
  "paths": {
    "/posts": {
      "get": {
        "responses": {
          "200": {
            "description": "successful"
          }
        },
        "tags": [
          "context_tag",
          "path_tag",
          "operation_tag"
        ],
        "summary": "fetch list",
        "produces": [
          "application/json"
        ]
      }
    }
  }
}

@drewish drewish changed the title Accept tags for operation from parent contexts Accept tags for operations from parent contexts Mar 16, 2017
@drewish drewish merged commit bf15337 into master Mar 16, 2017
@drewish drewish deleted the tags branch March 16, 2017 23:33
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.

1 participant