-
Notifications
You must be signed in to change notification settings - Fork 47
does swagger-server support microservices defined through individual swagger specs? #19
Comments
Yeah, there are a couple ways you can do that.
|
Thank you very much @BigstickCarpet for your suggestions. In the approach 1, is it that, all the microservices use the same datastore? or they use independent datastores! |
Each Node cluster runs in a separate process, so there is no shared memory. So if you're using the MemoryDataStore, then you'll need to maintain separate data for each cluster. If you're using the FileDataStore, then all clusters can share the same data store. Although, if your server is handling many simultaneous requests, then you could run into locking issues, where multiple clusters are trying to read/write to the same JSON file at the same time. |
Thank you very much for your quick answer @BigstickCarpet. I'll try the above two options and check how I could achieve my use case. |
@BigstickCarpet Actually, I have tried the #1 solution but failed... I've also tried to do it with the sample in the Node's cluster feature. The following is my codes:
In this case, neither of the two swagger files can work... Is there anything wrong I configured? |
on the subject of reading of multiple swagger files, I can share my implementation. The idea is to write a root swagger file, list all the paths you want, and use
|
Hi,
Thank you for a wonderful API. I am currently developing microservices using swagger 2.0 spec: meaning, I've one complete swagger spec for each of my microservice. Say, I've
Now, is it possible to load all these three YAML files (swagger 2.0 specs) into one server running at a specific port (say 8000)?
Thanks and Regards,
Phani
The text was updated successfully, but these errors were encountered: