Commit Graph

84 Commits

Author SHA1 Message Date
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
aa4e6f2070 Include example definition in test app
From changes in this commit: eadaf34ef6

we need to include the new output in the test-app swagger.json file
2021-02-06 17:42:23 -07:00
Jamie Macey
5a60dee838 Add a spec for #342 body/required 2020-10-17 14:15:41 -07:00
Jamie Macey
13a3977c2c Merge remote-tracking branch 'bspellacy/master' into jamie 2020-10-17 13:56:19 -07:00
Jamie Macey
0d1a742f6f empty content is now pruned 2020-10-17 13:44:04 -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
ab457743a8 also move away from deprecated type: basic 2020-10-17 13:38:56 -07:00
Jamie Macey
3e10b09f23 swap deprecated SecurityDefinitions for SecuritySchemes 2020-10-17 13:38:56 -07:00
Jamie Macey
d090516f48 properly list servers for openapi v3 2020-10-17 13:38:56 -07:00
Jamie Macey
68e64dba2c OpenAPI currently at v 3.0.3 2020-10-17 13:38:56 -07:00
Jamie Macey
7e1a79220c start standing up exhaustive output unit tests for OpenAPI v3 2020-10-17 13:38:56 -07:00
Jamie Macey
b37c7905cd stub controller to help with future testing 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
Jamie Macey
08b1678e53 skip a test requiring headless firefox capybara driver 2020-10-12 13:37:57 -07:00
MikeSmithEU
267007ef1b
Update blogs_controller.rb
Fix typo
2020-07-22 11:23:01 +02: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
Oleg Yakovenko
81c110022e example json actualized 2020-06-04 17:19:15 +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
a96a466205 doctoc the readme 2020-04-05 00:44:20 +01:00
Greg Myers
965f14406f add support for oneOf anyOf allOf 2020-04-05 00:36:25 +01:00
Greg Myers
d644a91da5 Remove all commented code. Add "nullable" 2020-04-04 23:37:38 +01:00
Greg Myers
bd038949b4 Fix incorrect merge, Capybara::Webkit no longer loaded 2020-04-04 20:09:21 +01:00
Greg Myers
74ea37e048
Merge branch 'master' into openapi/merge 2020-04-04 20:05:00 +01:00
Greg Myers
1f745003ff fix do not delete from operation level metadata 2020-03-29 20:16:03 +01:00
Greg Myers
231a2d135c add rewrite for securitySchemes into swagger_doc 2020-03-24 14:56:24 +00:00
Greg Myers
e9aebe6221 fix mistake in assigning header nodes for type 2020-03-22 23:45:47 +00:00
Greg Myers
eb58fe687a add upgrade for basepath and host to server urls 2020-03-22 23:39:48 +00:00
Greg Myers
70eb277e04 add upgrade path and query param type output to openapi3 if selected 2020-03-21 21:38:09 +00:00
Greg Myers
2b239ef0f3 Reverted some files related to definitions changes 2020-03-21 17:04:41 +00:00
Greg Myers
0020d71c90 Remove deprecation warnings for Rails 5 and 6 2020-03-20 20:52:36 +00:00
Greg Myers
b5e210cd96 Merge branch 'openapi/master' into openapi/merge 2020-03-20 15:38:40 +00:00
hdpuk86
db45cafea2 merge master fork 2019-10-24 21:17:23 +01:00
Nathan Broadbent
e5eb44191c Use RSpec.describe to fix IRB context warning in Rails console 2019-10-17 16:40:31 +07:00
Greg Myers
3542cd0857 Add a Sprockets 4 manifest
Fix #243
2019-10-14 22:17:12 +01:00
Hayley
d01dff199c potential test fix 2019-10-08 16:43:11 +01:00
Greg Myers
ac1d61b08f Replace webdriver with firefox-headless 2019-10-08 15:57:16 +01:00
Peter McCready
5c9154864e add options and trace verbs 2019-10-04 14:51:41 +01:00
Greg Myers
8bdf3eac08 Update the contributing doc, referencing the CI files 2019-10-02 13:50:56 +01:00
Jay Danielian
032ad5dc54 Fixes last little pathing mistakes from rename
All specs are passing in all gems and in test-app

Properly generates open api 3 swagger via rake rswag:specs:swaggerize and via bundle exec rspec in test-app dir
2019-08-01 09:10:38 -04:00
Jay Danielian
b8dcc8fe30 Adds support for proper requestBody examples. Adds mechanism to allow for adding additional ways to add request body examples
Can add externalValue or  it will work and produce valid swagger spec.

The Symbol name matching the let parameter is always required
2019-07-21 15:03:37 -04:00
Jay Danielian
4c2097e017 Fixes response_validator to handle 3.0 responses and validate against the schema.
JSON::Validator already handles anyOf oneOf schema definitions, so those can be passed in and validation errors are returned properly
2019-07-20 14:33:51 -04:00
Jay Danielian
cd348b53f8 Adds anyOf support to requestBody 2019-07-20 13:50:38 -04:00
Jay Danielian
5e71651d6d Adds auth_tests_spec and validated that it is generating valid 3.0 security related swagger 2019-07-17 20:18:12 -04:00
Jay Danielian
28bcc121ba formatting 2019-07-17 20:10:10 -04:00
Jay Danielian
aa133b90fc Adds request_body_multipart method which enables schema properties to be written for multipart upload body
Will inspect the provided hash and add the property file_name to the parameters collection so upload and 3.0 output will work properly
2019-07-17 20:07:30 -04:00