-
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
Ensure all {modelIdentity}/{action}
actions are handled as 'model-related'
#82
Conversation
Improve `SwaggerRouteInfo` interface to support above: 1. Add separate fields for action vs blueprint action. 2. Add separate flag for shortcut blueprint routes. Big picture for PR: Ensure all `{modelIdentity}/{action}` actions are handled as 'model-related': 1. All `{modelIdentity}/{action}` actions treated as related to the model (including `/allActions`) and Swagger content integrated / merged appropriately. 2. Actions2 actions recognised as model-related, and therefore recognised as blueprint action overrides (where applicable) 3. Improve consistency of handling/merging of actions (and Swagger documentation) relating to model controllers.
Refactor route parsing to rely predominantly on `{modelIdentity}/{action}` to ensure all model-related actions (including overrides including actions2) are captured. This is consistent with Sails `parseBlueprintOptions()`. Big picture for PR: Ensure all `{modelIdentity}/{action}` actions are handled as 'model-related': 1. All `{modelIdentity}/{action}` actions treated as related to the model (including `/allActions`) and Swagger content integrated / merged appropriately. 2. Actions2 actions recognised as model-related, and therefore recognised as blueprint action overrides (where applicable) 3. Improve consistency of handling/merging of actions (and Swagger documentation) relating to model controllers.
Big picture for PR: Ensure all `{modelIdentity}/{action}` actions are handled as 'model-related': 1. All `{modelIdentity}/{action}` actions treated as related to the model (including `/allActions`) and Swagger content integrated / merged appropriately. 2. Actions2 actions recognised as model-related, and therefore recognised as blueprint action overrides (where applicable) 3. Improve consistency of handling/merging of actions (and Swagger documentation) relating to model controllers.
Refactor generation to improve route/model/controller Swagger merge. Refactor for `SwaggerRouteInfo` changes. Big picture for PR: Ensure all `{modelIdentity}/{action}` actions are handled as 'model-related': 1. All `{modelIdentity}/{action}` actions treated as related to the model (including `/allActions`) and Swagger content integrated / merged appropriately. 2. Actions2 actions recognised as model-related, and therefore recognised as blueprint action overrides (where applicable) 3. Improve consistency of handling/merging of actions (and Swagger documentation) relating to model controllers.
Includes full re-generation of parsed routes based on `SwaggerRouteInfo` changes. Minor adjustment to Sails AttributeDefinition as `type` optional. Big picture for PR: Ensure all `{modelIdentity}/{action}` actions are handled as 'model-related': 1. All `{modelIdentity}/{action}` actions treated as related to the model (including `/allActions`) and Swagger content integrated / merged appropriately. 2. Actions2 actions recognised as model-related, and therefore recognised as blueprint action overrides (where applicable) 3. Improve consistency of handling/merging of actions (and Swagger documentation) relating to model controllers.
Add new Actions2 action overriding blueprint action. Adjust `UserController` to add new Swagger merge. Big picture for PR: Ensure all `{modelIdentity}/{action}` actions are handled as 'model-related': 1. All `{modelIdentity}/{action}` actions treated as related to the model (including `/allActions`) and Swagger content integrated / merged appropriately. 2. Actions2 actions recognised as model-related, and therefore recognised as blueprint action overrides (where applicable) 3. Improve consistency of handling/merging of actions (and Swagger documentation) relating to model controllers.
Swagger generation merge changes resulted in ordering changes in generated output. Big picture for PR: Ensure all `{modelIdentity}/{action}` actions are handled as 'model-related': 1. All `{modelIdentity}/{action}` actions treated as related to the model (including `/allActions`) and Swagger content integrated / merged appropriately. 2. Actions2 actions recognised as model-related, and therefore recognised as blueprint action overrides (where applicable) 3. Improve consistency of handling/merging of actions (and Swagger documentation) relating to model controllers.
Swagger generation changes related to new test cases and model-related merge changes (UserController now equivalent to User model). Big picture for PR: Ensure all `{modelIdentity}/{action}` actions are handled as 'model-related': 1. All `{modelIdentity}/{action}` actions treated as related to the model (including `/allActions`) and Swagger content integrated / merged appropriately. 2. Actions2 actions recognised as model-related, and therefore recognised as blueprint action overrides (where applicable) 3. Improve consistency of handling/merging of actions (and Swagger documentation) relating to model controllers.
Swagger generation changes related to new test cases and model-related merge changes (UserController now equivalent to User model). Big picture for PR: Ensure all `{modelIdentity}/{action}` actions are handled as 'model-related': 1. All `{modelIdentity}/{action}` actions treated as related to the model (including `/allActions`) and Swagger content integrated / merged appropriately. 2. Actions2 actions recognised as model-related, and therefore recognised as blueprint action overrides (where applicable) 3. Improve consistency of handling/merging of actions (and Swagger documentation) relating to model controllers.
Closes #81. |
@theoomoregbee A review would be good for this change. The way |
cool! will give this a look before end of today. Thanks @danielsharvey |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just two minor comments
…ee/sails-hook-swagger-generator into fix-custom-blueprint * 'fix-custom-blueprint' of https://github.com/theoomoregbee/sails-hook-swagger-generator: docs: remove expressjs license badge and added npm downloads badge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
🎉 This PR is included in version 3.2.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Overview
Ensure all
{modelIdentity}/{action}
actions are handled as 'model-related':{modelIdentity}/{action}
actions treated as related to the model (including/allActions
) and Swagger content integrated / merged appropriately.Details
refactor: Improve
SwaggerRouteInfo
interfaceImprove
SwaggerRouteInfo
interface to support above:refactor: Refactor route parsing using
{modelIdentity}/{action}
Refactor route parsing to rely predominantly on
{modelIdentity}/{action}
to ensure all model-related actions (including overrides including actions2) are captured. This is consistent with SailsparseBlueprintOptions()
.refactor: Refactor transformations phase for
SwaggerRouteInfo
changesrefactor: Refactor Swagger generation for model-related changes
Refactor generation to improve route/model/controller Swagger merge.
Refactor for
SwaggerRouteInfo
changes.test: Refactor tests for Swagger generation (model-related changes)
Swagger generation changes related to new test cases and model-related merge changes (UserController now equivalent to User model).
Swagger generation merge changes resulted in ordering changes in generated output.
Add new Actions2 action overriding blueprint action.
Adjust
UserController
to add new Swagger merge.Includes full re-generation of parsed routes based on
SwaggerRouteInfo
changes.Minor adjustment to Sails AttributeDefinition as
type
optional.