read me for parameterMacro
This commit is contained in:
@@ -115,6 +115,7 @@ dom_id | The id of a dom element inside which SwaggerUi will put the user interf
|
||||
oauth2RedirectUrl | OAuth redirect URL
|
||||
operationsSorter | Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method) or a function (see Array.prototype.sort() to know how sort function works). Default is the order returned by the server unchanged.
|
||||
configUrl | Configs URL
|
||||
parameterMacro | MUST be a function. Function to modify parameters. Accepts two arguments parameterMacro(operation, parameter). Operation is an object passed for context, remains immutable, parameter can be changed directly
|
||||
|
||||
### Plugins
|
||||
|
||||
|
||||
@@ -77,9 +77,6 @@ window.onload = function() {
|
||||
const ui = SwaggerUIBundle({
|
||||
url: "http://petstore.swagger.io/v2/swagger.json",
|
||||
dom_id: '#swagger-ui',
|
||||
modelPropertyMacro: function (model) {
|
||||
return model
|
||||
},
|
||||
parameterMacro: function (operation, parameter) {
|
||||
return parameter
|
||||
},
|
||||
|
||||
82
dist/swagger-ui-bundle.js
vendored
82
dist/swagger-ui-bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/swagger-ui-bundle.js.map
vendored
2
dist/swagger-ui-bundle.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AAseA;AAkoJA;AAwiCA;AAo9GA;AAw5HA;AAkvGA;AAy7EA;AAoqDA;AAm/CA;AA6jDA;AAk/CA;;;;;AAw2CA;AAmwJA;;;;;;;;;;;;;;AA8sEA;AAyoIA;AAiuJA;AA8kHA;AAonGA;AAukEA;AA02DA;AA82EA;AA0qGA;;;;;;AAkpFA;AA+4FA;;;;;AA8+CA;AA2qFA;AAw2CA;AA2kCA;AA88CA;AAwwEA;AA66FA;;;;;;;;;AAo+BA;AA2zIA;AAk4DA;AA8mDA;;;;;;AA+9BA;AA8iHA;AAipGA","sourceRoot":""}
|
||||
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AAseA;AAkoJA;AAwiCA;AAo9GA;AAw5HA;AAkvGA;AAy7EA;AAoqDA;AAm/CA;AA6jDA;AAk/CA;;;;;AAw2CA;AAmwJA;;;;;;;;;;;;;;AA8sEA;AAyoIA;AAiuJA;AA8kHA;AAonGA;AAukEA;AA02DA;AAq3EA;AA+nGA;;;;;;AAqsFA;AA+4FA;;;;;AA8+CA;AA2qFA;AAw2CA;AA2kCA;AA88CA;AAwwEA;AA66FA;;;;;;;;;AAo+BA;AA2zIA;AAk4DA;AA8mDA;;;;;;AA+9BA;AA8iHA;AAipGA","sourceRoot":""}
|
||||
2
dist/swagger-ui.js
vendored
2
dist/swagger-ui.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user