-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support multiple s-models.json|yaml files within anywhere of the project's space #9
Comments
A feasible solution is to extend the JSON refs that currently only allow referencing to local models, so that files or even remote references can be specified. Example
|
yes, that's a nice solution for referring models outside of the current file . But for example if you want to maintain 2 or more different s-models.json|yaml files without even having the refs usage there , it would be something like :
I implemented something similar with this with Swagger models for a customer, so the final solution was on having one single big models object builded from multiple models files and this way you can reference anything from a file to another because the models are merged in that single object and they have direct access to each other . I'll try to do a quick implementation for that to prove my intentions. |
Ok, agree. IMHO the new version should have both variants included. |
yep, true. It could be added a sanity check feature there and throw an error if there are duplicate models names on different files, so this way models are not getting unconsciously overwritten. For the issue with updating only the modified models I would suggest some more generic implementation like a sync/caching feature , I'm trying to think best "generic" I can with the new upcoming support for multiple microservices providers like Azure, Google Cloud , etc . and having compatible features with the most of those. |
the plugin should be modified to support s-models.json|yml for different functions as different files like s-function.json|yml instead of supporting only a single s-models.json|yml file stored in the main project root directory ( that file gets huge when you add more models for API endpoints )
The text was updated successfully, but these errors were encountered: