Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Multiple swagger.json files generated #1

Open
RoarkeRandall opened this issue Mar 12, 2018 · 2 comments
Open

Multiple swagger.json files generated #1

RoarkeRandall opened this issue Mar 12, 2018 · 2 comments

Comments

@RoarkeRandall
Copy link

if you split out your protobuf definition into multiple files, so something like:

  • messages.proto
  • services.proto

then a json file will be generated per proto file.

I don't really know swagger at all (yet), but I think it expects a single json file

@elliots
Copy link
Owner

elliots commented Mar 12, 2018

Does the services one contain all the messages?

@elliots
Copy link
Owner

elliots commented Mar 12, 2018

I'm currently merging many swagger files together with jq... not pretty but getting the job done.

j=`jq -s '.[0] * .[1]' $ALL_SCHEMAS_FILE $CURRENT_API_FILE`
echo $j > $ALL_SCHEMAS_FILE

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants