Skip to content

multiple schema #14

Answered by skryukov
ShonRepo asked this question in Q&A
Jan 10, 2024 · 2 comments · 8 replies
Discussion options

You must be logged in to vote

In the discussion to the initial answer we found out an issue in skooma, so here is an updated answer:

I'd suggest using RSpec flags:

  admin_schema = Rails.root.join("swagger", "admin", "v1.yaml")
  config.include Skooma::RSpec[admin_schema, path_prefix: "/admin/v1"], :admin_api
  config.define_derived_metadata(file_path: %r{/spec/requests/admin}) { |metadata| metadata[:admin_api] = true }

  public_schema = Rails.root.join("swagger", "public", "v1.yaml")
  config.include Skooma::RSpec[public_schema, path_prefix: "/public/v1"], :public_api
  config.define_derived_metadata(file_path: %r{/spec/requests/public}) { |metadata| metadata[:public_api] = true }

Full example is now available here: h…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
8 replies
@skryukov
Comment options

@ShonRepo
Comment options

@skryukov
Comment options

@ShonRepo
Comment options

@skryukov
Comment options

Answer selected by ShonRepo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #13 on January 10, 2024 13:32.