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
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
da230a4f3e
add header type schema support for openapi3
2020-03-21 23:17:00 +00:00
Greg Myers
a25307dc69
add support for openapi 3 securitySchemas
2020-03-21 23:14:58 +00:00
Greg Myers
9414ca16b6
add upgrade parameters refs to openapi3
2020-03-21 22:38:49 +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
23a1074d07
Add tests for OA3 components/schemas loader with upgrade notice
2020-03-21 20:24:04 +00:00
Greg Myers
095067792f
add loader for OA3 schema definitions with version based deprecation
...
notice
2020-03-21 19:51:01 +00:00
Greg Myers
b5e210cd96
Merge branch 'openapi/master' into openapi/merge
2020-03-20 15:38:40 +00:00
Rutger Gelling
f331e064fd
Add yaml support ( #7 )
2020-01-27 20:24:27 -05:00
Rutger Gelling
79304a1bc1
Add support for multiple content types in examples ( #8 )
2020-01-27 20:20:36 -05:00
Greg Myers
63f01962ad
Merge pull request #254 from fooki/master
...
Parameterize the pattern for test locations
2019-11-17 09:55:54 +00:00
Karl Johansson
4c613af2ba
Allow tests to be run without generating docs
...
By providing the 'document: false' metadata, tests will be run but no swagger
documentation will be generated for the tagged example groups. It works on all
kinds of example groups (responses, verbs, paths etc..).
2019-11-15 16:21:04 +01:00
Karl Johansson
3cd9d38e19
Parameterize the pattern for test locations
...
This commit allows users to specify search patterns when finding tests to
swaggerize. Omitting the pattern parameter makes rswag search with the default
patterns.
A typical usecase for this feature is when you already have a test suite set up
and you want to use rswag for generating swagger docs rather than high-coverage
testing.
Usage:
rake rswag:specs:swaggerize PATTERN='/your_path..'
2019-11-15 14:51:17 +01:00
Greg Myers
c904a32e51
Move constraint to less than rails 7
2019-11-02 17:06:21 +00:00
Greg Myers
eeb1026691
Fix invalid Swagger in YAML values
...
The original fix failed because though the Keys were now strings, some
of the values for path variables were also symbols.
Psych does have a safe_load which has a whitelist of classes but it does
not have a safe_dump mode. We could have used deep_transform_values and
manually converted the classes we did not want, but why risk a buggy
implementation when JSON.generate works just fine?
2019-11-02 13:13:06 +00:00
Greg Myers
2c0f3c9396
Fix invalid Swagger in YAML
2019-11-02 12:58:36 +00:00
Greg Myers
acab437a7d
Add failing test showing Psych errors
2019-11-02 12:55:09 +00:00
Greg Myers
0e04635b15
Write the files using specified format
2019-11-02 11:19:01 +00:00
Greg Myers
73b84101cc
Adding yaml as option for generator
...
New installations will get :yaml as it's default with openapi 3 as the
version. Old installations will have the key missing and will default
to :json with an easy upgrade path.
2019-11-02 10:45:38 +00:00
Greg Myers
90d7fada85
Merge pull request #249 from BookOfGreg/fix/swagger-generator
...
Point the railtie to the correct file
2019-10-18 23:28:43 +01:00
Greg Myers
c14f72a45e
Point the railtie to the correct file
...
Fixes #248
2019-10-18 23:18:32 +01:00
Greg Myers
9722419647
Merge pull request #180 from fishpercolator/default_swaggerize
...
Add a 'rake rswag' that runs swaggerize as the default
2019-10-17 22:35:50 +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
4d29e09010
Add spec generator test
2019-10-16 23:19:24 +01:00
Greg Myers
189a7ef061
Move spec generator files, organize whitespace in generator output
2019-10-16 22:05:14 +01:00
Greg Myers
778d250385
Split file join path
2019-10-16 21:12:36 +01:00
Greg Myers
77d00407a4
whitespace linting
2019-10-16 20:51:53 +01:00
Greg Myers
8b61984fb3
Merge branch 'master' into feature/request_spec_generator
2019-10-16 20:44:11 +01:00
Peter McCready
5c9154864e
add options and trace verbs
2019-10-04 14:51:41 +01:00
jdanielian
72becffefe
Merge pull request #5 from gravityslave92/master
...
Remove hindrance for migrating to rails 6
2019-09-07 08:33:01 -04:00
Jay Danielian
6a4cc8de8d
Adds fix for multiple files to be marked in request_body_multipart
2019-09-07 08:21:56 -04:00
gravityslave92
275c3b1994
Update dependency add versional protection
2019-09-06 14:58:00 +03:00
gravityslave92
8f2378eb6f
Remove hinders for migrating to rails 6
2019-09-06 12:57:44 +03:00
Jay Danielian
5555edc59f
Only automatically save examples if examples are not given explicitly in the spec itself
2019-08-26 22:25:53 -04:00
Thiago Pradi
ac65dc1780
Gemfile / gemspec files compatible with Rails 6
2019-08-25 22:36:14 -03:00
Jay Danielian
5a8d1ce359
Updates README with proper links and examples for new OpenApi 3.0 syntax / features
...
Missed a few generator items as part of the rename
2019-08-04 11:00:33 -04:00
Jay Danielian
157175c90f
Finishes some renaming elements that were missed previously
...
Modifes the travis.yml in trying to setup travis CI build
2019-08-01 14:05:57 -04:00
Jay Danielian
6d285d2c4f
Notes in the todos
2019-08-01 13:05:44 -04: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
475929e9aa
Renames gems to open_api-rswag-*
2019-08-01 08:37:05 -04:00
Jay Danielian
13f7007b2f
Renames and fixes specs in api and specs project to prefix OpenApi module. Gem name to open_api-rswag
2019-07-27 14:53:01 -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