Skip to content

Commit

Permalink
Merge pull request openfoodfoundation#11960 from mkllnk/rswag-depreca…
Browse files Browse the repository at this point in the history
…tions

Update Swagger config to new naming
  • Loading branch information
rioug authored Dec 22, 2023
2 parents e3a838b + 82d3199 commit ffbdb17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/initializers/rswag_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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
config.swagger_root = Rails.root.join("swagger").to_s
config.openapi_root = Rails.root.join("swagger").to_s

# 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
4 changes: 2 additions & 2 deletions config/initializers/rswag_ui.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# (under swagger_root) as JSON or YAML endpoints, then the list below should
# correspond to the relative paths for those endpoints.

config.swagger_endpoint 'v1.yaml', 'API V1 Docs'
config.swagger_endpoint 'dfc.yaml', 'OFN DFC API Docs'
config.openapi_endpoint 'v1.yaml', 'API V1 Docs'
config.openapi_endpoint 'dfc.yaml', 'OFN DFC API Docs'

# Add Basic Auth in case your API is private
# config.basic_auth_enabled = true
Expand Down

0 comments on commit ffbdb17

Please sign in to comment.