-
Notifications
You must be signed in to change notification settings - Fork 33
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
Customization of blueprint routes on model does not work #77
Comments
Found it - the model per-blueprint-action overrides where not being merged correctly. Bugfix shortly. |
Previously, `allActions` custom documentation in model files was correctly merged into the final output, but per-blueprint-action documentation (in either JSDoc or `swagger` element) was missed. Closes #77.
Previously, `allActions` custom documentation in model files was correctly merged into the final output, but per-blueprint-action documentation (in either JSDoc or `swagger` element) was missed. Closes #77.
🎉 This issue has been resolved in version 3.2.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@OscarMeier Let us know how you get on. Thanks for finding this. |
@danielsharvey Thank you for the quick fix! The custom blueprint route documentation works as expected for the description and the summary. But I didn't figure out how to exclude an action. I tried to use the * /add:
* exclude: true
*
* /populate:
* exclude: true
*/ I checked your code and found out that you just omit the
But the blueprint action documentation does not get removed, right? I would propose to keep the if (pathEntry.exclude) {
return;
} |
@OscarMeier Let me look! It looks like I did not check the test data closely enough! (several changes had large effects and I must not have checked the test fixture closely enough). |
Found and fixed. Merging now. Note that the |
Also add new test data and correct test fixture. Closes #77.
🎉 This issue has been resolved in version 3.2.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@OscarMeier Let us know how you get on. |
@danielsharvey Thank you for resolving this issue! Everything works as expected. |
I'm not able to customize the blueprint route documentation: Neither by adding swagger JSDoc nor by adding the swagger object to the model (api/models/Foo.js):
I dug into your code and found the referenced line. It's the line, where the paths get generated. The merged models contain the correct documentation (summary: 'Foo', description: 'Bar') but the models are not used in the
generatePaths()
function to override the blueprint templates. Did I overlook something or is this feature not implemented yet?sails-hook-swagger-generator/lib/swagger-doc.ts
Line 95 in eafbed4
The text was updated successfully, but these errors were encountered: