Commit Graph

164 Commits

Author SHA1 Message Date
Greg Myers
a813b63bcc
Merge pull request #450 from marksiemers/master
Loosen gemspec requirement to allow rails 7.0
2021-12-03 22:41:41 +00:00
Jay Dorsey
86c512f639 Add single quotes around parameter name 2021-09-24 16:11:44 -04:00
Jay Dorsey
32638062d7 Better error message for missing let
I've run into this problem a number of times. The original error message
is actually a `NoMethodError` and it's not always immediately clear what
the solution is, particuarly if you're new to rspec or rswag

Wanted to see if this kind of behavior is something that the rswag team
would be interested in adopting. I have a few other of these in mind
(will do as small PRs, with tests)
2021-09-24 16:10:40 -04:00
Mark Siemers
dd6530b718 Loosen gemspec requirement to allow rails 7.0 2021-09-22 17:32:58 -04:00
Blake Erickson
989aab656f
Revert "Add a macro for complexes multiparts" 2021-03-06 14:52:49 -07:00
Blake Erickson
f7036b7e5a
Merge pull request #300 from sobrinho/master
Add a macro for complexes multiparts
2021-03-06 10:22:54 -07:00
Blake Erickson
0169fbab66
Merge pull request #404 from Wolfer/patch-1
Allow use #/components/parameters and other in inherited $refs
2021-03-06 09:58:10 -07:00
mynnx
a34c931bb6 Show the response body for comparison when schema checks fail 2021-03-03 16:32:16 -08:00
Serg F
3d3d93f3ab
Allow use #/components/parameters and other in inherited $refs 2021-02-19 15:15:44 +03:00
Blake Erickson
52939874d6 Clean up README merge conflict 2021-02-09 08:05:58 -07:00
Donatas Povilaitis
cbaf6cd3e4 Fix response examples 2021-01-29 20:47:46 +02:00
Blake Erickson
7f88c5d1f3 Merge branch 'master' into jamie 2021-01-27 05:18:35 -07:00
Paul Filipow
b63dd343af safe navigation in build_query_string_part 2021-01-26 13:57:44 -08:00
Paul Filipow
bd48e40529 add schema to mime type instead of overwriting 2021-01-25 21:12:16 -08:00
Paul Filipow
465950a65c don't clobber response content 2021-01-25 16:11:54 -08:00
Alexander
ad95f1098a Inherit consumes from swagger schema. Addresses #320. 2021-01-22 13:25:27 +02:00
Jamie Macey
13a3977c2c Merge remote-tracking branch 'bspellacy/master' into jamie 2020-10-17 13:56:19 -07:00
Jamie Macey
c62bfda91d Merge branch 'output-specs' into jamie 2020-10-17 13:43:05 -07:00
Jamie Macey
c161de3899 Merge branch 'spec-deprecations' into jamie 2020-10-17 13:43:00 -07:00
Jamie Macey
91a27852f2 more flex in this check 2020-10-17 13:38:56 -07:00
Jamie Macey
f6630cc7a6 fix a bug related to upgrade_request_type! translation 2020-10-17 13:38:56 -07:00
Jamie Macey
0a9487b328 make spec output less noisy 2020-10-17 13:34:17 -07:00
Jamie Macey
b3fa5ba54e Merge remote-tracking branch 'psmandzich/master' into jamie 2020-10-17 13:21:28 -07:00
Jamie Macey
7e2c52b242 Merge remote-tracking branch 'olegkyz/bugfix/examples-content' into jamie 2020-10-17 13:14:47 -07:00
Greg Myers
d558bd4774
Merge pull request #334 from akofink/issue-333
Update wording in gemspecs to include OpenAPI
2020-10-14 23:08:13 +01:00
psmandzich
347f9da32e enable swagger empty body responses 2020-07-21 09:50:47 +02:00
Brennan Spellacy
30002e5b98 Add required field 2020-07-01 20:20:41 -07:00
Andrew Kofink
f0fba9c093
Update wording in gemspecs to include OpenAPI
Fixes #333

Mentioning OpenAPI in the gemspec allows users on rubygems.org to find
this gem easily. Those who are still looking for Swagger tools will also
continue to find the gem, since I've mentioned that OpenAPI used to be
called Swagger.

Signed-off-by: Andrew Kofink <akofink@redhat.com>
2020-06-08 12:00:08 -04:00
Oleg Yakovenko
7c3c357291 cleanup 2020-06-04 17:22:20 +03:00
Oleg Yakovenko
1ff396fb56 example group helper adjustment 2020-06-04 17:17:30 +03:00
Oleg Yakovenko
9c297317b2 keep examples content 2020-06-04 16:21:43 +03:00
Graceful Potato
3b85f09acf Fix RoutePareser#routes and add spec for it 2020-05-26 02:01:38 +03:00
Gabriel Sobrinho
f8dbd98bbc
Add a macro for complexes multiparts
This will allow to describe multipart in a short way, like JSON payload:

Before:

    put 'Creates a blog with thumbnail' do
      consumes 'multipart/form-data'
      parameter name: :title, in: :formData, type: :string, required: true
      parameter name: :content, in: :formData, type: :string, required: true
      parameter name: :file, in: :formData, type: :file, required: true

      let(:blog) { FactoryBot.build(:blog) }
      let(:title) { blog.title }
      let(:content) { blog.content }
      let(:file) { blog.file }

      ...
    end

After:

    put 'Creates a blog with thumbnail' do
      consumes 'multipart/form-data'
      parameter name: :blog, in: :formData, schema: { '$ref' => '#/definitions/blog' }

      let(:blog) { FactoryBot.attributes_for(:blog) }

      ...
    end

Your mileage may vary but you can always choose the best option.
2020-04-16 22:38:35 -03:00
Greg Myers
2797866224
fix #295 2020-04-08 23:09:31 +01:00
Greg Myers
d644a91da5 Remove all commented code. Add "nullable" 2020-04-04 23:37:38 +01:00
Greg Myers
b158f1e164 add specific test for formData 2020-04-04 23:05:26 +01:00
Greg Myers
e53f2ca257 remove commented code. 2020-04-04 23:02:25 +01:00
Greg Myers
2af7c13e59 feature handle in: :body and :formData params 2020-04-04 22:53:23 +01:00
Greg Myers
cbc7a33ac3 feature remove trailing produces and consumes 2020-04-04 21:25:17 +01:00
Greg Myers
f1f8b0ed18 fix oauth corrections correct way round 2020-04-04 21:03:04 +01:00
Greg Myers
96fc5276c4 add oauth flow renaming and warnings 2020-04-04 20:55:04 +01:00
Greg Myers
d66be41d04 Fix oauth2 transform keys except type 2020-04-04 20:43:31 +01:00
Greg Myers
e0ed6bb646
Merge branch 'master' into openapi/merge 2020-04-04 19:47:12 +01:00
Greg Myers
b000c94ea0 add output for swaggerize command by inheriting thhe base text formatter 2020-03-29 20:27:36 +01:00
Greg Myers
02cf2e668b doc update message about metadata[:operation] 2020-03-29 20:25:27 +01:00
Greg Myers
1f745003ff fix do not delete from operation level metadata 2020-03-29 20:16:03 +01:00
Greg Myers
405ccca494 Add upgrades for consumes and produces in content with schemas 2020-03-26 23:37:00 +00:00
Greg Myers
3393263df7 Remove duplicate test block 2020-03-26 22:17:16 +00:00
Greg Myers
6b4f49aacb Basic rubocops 2020-03-24 16:02:13 +00:00
Greg Myers
5060697761 add conversion oauth flow to flows 2020-03-24 15:20:15 +00:00