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

Customizations on an it-block completely remove customizations set on a parent describe #235

Open
agiveygives opened this issue May 31, 2024 · 0 comments

Comments

@agiveygives
Copy link

In some situations, I was my test to be more descriptive, but I don't necessarily want my docs to have the same description. However, when I customize the description on the test level, the values set on the describe are lost. For example, the following test...

describe V1::MyController, openapi: {
  summary: 'Do the stuff that my controller does',
  tags: ["My tag"],
} do
  it 'returns a 200 status with a json body' , openapi: { description: 'Success' } do
    get 'v1/my'
    expect(response).to have_http_status(:ok)
    expect(response.parsed_body).to eq(expected_response)
  end
end

produces the following yaml

"/v1/my":
    get:
      summary: index
      tags:
      - V1::My
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                ...

But I would expect it to output the following yaml

"/v1/my":
    get:
      summary: Do the stuff that my controller does
      tags:
      - My tag
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                ...
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