Conversation
|
@preriasusi Could you please review? |
|
This looks good, but is behaving very strangely. E.g. After uploading a Swagger document, the documentation viewer renders, but none of the sub sections will open when clicking show/hide or the endpoint name. I notice the following console errors: |
|
I am also noticing multiple sAlerts when clicking the 'choose file' button:
Check the event handlers for the template to see if they are overlapping. |
apis/collection/schema.js
Outdated
| }, | ||
| submit_methods: { | ||
| type: [String], | ||
| label: 'Allow try-out for following methods:', |
There was a problem hiding this comment.
We need to internationalize this label. It can be done via schema i18n. See, for example:
I suppose this error shows when npm packages installed/ran in the wrong order. If you delete folder 'node_modules' and reinstall packages it should work correctly |
|
@marla-singer is this ready for review? Please remember to toggle the 'ready for review' label, to make it clear when a PR is ready. I will go ahead and review, but wanted to make sure the PR is ready. |
|
@brylie Yes, PR is ready |
| AutoForm.hooks({ | ||
| apiDocumentationForm: { | ||
| onSuccess () { | ||
| sAlert.success(TAPi18n.__('manageApiDocumentationModal_LinkField_Updated_Message')); |
There was a problem hiding this comment.
Please separate this line into two parts:
// Get success message translation
const message = TAPi18n.__('manageApiDocumentationModal_LinkField_Updated_Message');
// Alert user of success
sAlert.success(message);It is a bit 'cleaner' this way, and shortens the line length.
| {{#if dataFetched}} | ||
| {{#if documentationValid}} | ||
| {{>swaggerUiContent apiDocumentation=apiDocumentation}} | ||
| {{>swaggerUiContent apiDoc=apiDoc api=api}} |
There was a problem hiding this comment.
Check the indentation on this file. It may be sufficient to use two space per nested level when indenting HTML files. This also matches our JS indentation convention.
|
I have done a review of the code. There are some 'lint/style' issues, but overall this is ready to merge soon. |
|
@brylie Done. Thanks for your recommendations! |
Closes #1490