Skip to content

Commit

Permalink
fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stkenny committed Dec 3, 2024
1 parent 72ea0ef commit 0603cfa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/initializers/rswag-api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This is used by the Swagger middleware to serve requests for API descriptions
# NOTE: If you're using rswag-specs to generate Swagger, you'll need to ensure
# that it's configured to generate files in the same folder
c.swagger_root = Rails.root.to_s + '/swagger'
c.openapi_root = Rails.root.to_s + '/swagger'

# Inject a lamda function to alter the returned Swagger prior to serialization
# The function will have access to the rack env for the current request
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/rswag-ui.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# NOTE: If you're using rspec-api to expose Swagger files (under swagger_root) as JSON endpoints,
# then the list below should correspond to the relative paths for those endpoints

c.swagger_endpoint '/api-docs/v1/swagger.json', 'API V1 Docs'
c.openapi_endpoint '/api-docs/v1/swagger.json', 'API V1 Docs'
end
4 changes: 2 additions & 2 deletions spec/swagger_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Specify a root folder where Swagger JSON files are generated
# NOTE: If you're using the rswag-api to serve API descriptions, you'll need
# to ensure that it's configured to serve Swagger from the same folder
config.swagger_root = Rails.root.to_s + '/swagger'
config.openapi_root = Rails.root.to_s + '/swagger'
# config.swagger_dry_run = false

# config.profile_examples = 0
Expand All @@ -19,7 +19,7 @@
# By default, the operations defined in spec files are added to the first
# document below. You can override this behavior by adding a swagger_doc tag to the
# the root example_group in your specs, e.g. describe '...', swagger_doc: 'v2/swagger.json'
config.swagger_docs = {
config.openapi_specs = {
'v1/swagger.json' => {
swagger: '2.0',
info: {
Expand Down

0 comments on commit 0603cfa

Please sign in to comment.