Skip to content
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

Upgrade to strong-swagger-ui@21.0 (swagger-ui@2.1) #114

Merged
merged 1 commit into from
Aug 13, 2015

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Aug 11, 2015

This patch upgrades loopback-explorer to use strong-swagger-ui@21.0, which is based on swagger-ui@2.1 and supports Swagger Spec 2.0.

Notes

Connect to strongloop-internal/scrum-loopback#412
Connect to #54

/to @raymondfeng @STRML please review

@bajtos
Copy link
Member Author

bajtos commented Aug 11, 2015

@slnode test please

@@ -16,12 +21,27 @@ $(function() {
apiKey: '',
dom_id: 'swagger-ui-container',
supportHeaderParams: true,
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about head?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT, the flag "supportedSubmitMethods" controls whether operation's model is editable or readonly.

https://github.com/strongloop/strong-swagger-ui/blob/b92b67923612d0f855ebe2c46ffd8ca728500fd2/src/main/javascript/view/OperationView.js#L80-L83

By default, this array is set to all HTTP verbs:

https://github.com/strongloop/strong-swagger-ui/blob/b92b67923612d0f855ebe2c46ffd8ca728500fd2/src/main/javascript/SwaggerUi.js#L26-L36

To be honest, I don't completely understand the purpose of this option. I just applied the value from swagger-ui's index.html. Perhaps we can remove this line completely and use swagger-ui's default instead?

@bajtos
Copy link
Member Author

bajtos commented Aug 12, 2015

I have removed supportedSubmitMethods and use the default list provided by (strong-)swagger-ui.

@raymondfeng LGTY now?

@raymondfeng
Copy link
Member

LGTM

@raymondfeng raymondfeng assigned bajtos and unassigned raymondfeng Aug 12, 2015
@bajtos bajtos force-pushed the feature/upgrade-to-swagger-ui-2.1 branch from 2d76f3c to 30017c8 Compare August 13, 2015 13:58
@bajtos
Copy link
Member Author

bajtos commented Aug 13, 2015

@slnode test please

bajtos added a commit that referenced this pull request Aug 13, 2015
…-2.1

Upgrade to strong-swagger-ui@21.0 (swagger-ui@2.1)
@bajtos bajtos merged commit ee42f03 into master Aug 13, 2015
@bajtos bajtos removed the #review label Aug 13, 2015
@bajtos bajtos deleted the feature/upgrade-to-swagger-ui-2.1 branch August 13, 2015 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants