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

show that rake oapi:fetch generates wrong output filename #869

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rw422
Copy link

@rw422 rw422 commented Aug 24, 2022

So when I do rake oapi:fetch (regardless of store parameter value) the generated swagger doc is called swagger_doc_swagger_doc.json which looks weird and is probably incorrect.

Failures:

  1) GrapeSwagger::Rake::OapiTasks#file store given boolean true api has version returns versioned swagger_doc.json
     Failure/Error: expect(File.basename(subject.send(:file, docs_url))).to eq('swagger_doc_v1.json')

       expected: "swagger_doc_v1.json"
            got: "swagger_doc_swagger_doc.json"

       (compared using ==)
     # ./spec/lib/oapi_tasks_spec.rb:160:in `block (6 levels) in <top (required)>'

  2) GrapeSwagger::Rake::OapiTasks#file store given name given api has version returns versioned oapi_doc.json
     Failure/Error: expect(File.basename(subject.send(:file, docs_url))).to eq('oapi_doc_v1.json')

       expected: "oapi_doc_v1.json"
            got: "oapi_doc_swagger_doc.json"

       (compared using ==)
     # ./spec/lib/oapi_tasks_spec.rb:175:in `block (6 levels) in <top (required)>'

  3) GrapeSwagger::Rake::OapiTasks#file no store given api has version returns versioned swagger_doc.json
     Failure/Error: expect(File.basename(subject.send(:file, docs_url))).to eq('swagger_doc_v1.json')

       expected: "swagger_doc_v1.json"
            got: "swagger_doc_swagger_doc.json"

@rw422 rw422 marked this pull request as ready for review August 24, 2022 21:47
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