Closed Aristona closed 6 years ago
hmmm what version of sailsjs are you using ?
@theo4u 0.12.14. Tried it with 0.12.13 too, same.
will look into this soon
Any news about it @theo4u ?
Oh, from observing the screenshots, the issue is with the Route.group seeing it as a separate controller I guess, if you can create a sample repo with this implementation, so I can pull and run through it @Aristona
@theo4u I'll normalize the routes file and try. If I'm out of luck, I'll ask for your help
@Aristona ok np 👍
@theo4u I cleared my routes.js file. It still reads the routes from somewhere. Does it read all the controllers and their methods or something? I double checked cache too. It generates a fresh json each time.
Edit: Seems like it reads controllers folder and tries to generate routes based on methods/controller names.
Yap, based on your controllers, the bootstrapped routes from sails are picked to generate the swagger, unless you don't want sails to generate auto routes for you, which you can turn off in config/blueprints and so on.
Is it still duplicating records ?
@theo4u I turned it off, didn't help
turning it off, still generates default blueprints routes, weird behaviour here and also duplication of records
Would test for both errors again, if you can upload a sample repo with your configuration, so i can pull and test with
@theo4u I'll do it next week probably. Will ping you when I'm done
the default model attribute was overriding the body defined in routes js. followed up here #29
Hi,
This is how my Swagger UI looks like.
My route:
My controller:
Why Swagger reads the property ID, and why does it read "body" object twice? Am I doing something wrong?
Ps. Token is coming from policies, but there is nothing related to ID in the policies.