You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 27, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/index.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,7 @@ The third parameter used in the library method is an `options` object containing
133
133
|[replaceVars](#replacevars-boolean)| Boolean value to indicate if postman variables should be replaced.|
134
134
|[additionalVars](#additionalvars-object)| Object to provide additional values for variables replacement.|
135
135
|[outputFormat](#outputformat-string)| Indicate the format of the output document. |
136
+
|[operationId](#operationid-string)| Indicate how to provide the value for `operationId` field. |
136
137
137
138
### info (Object)
138
139
@@ -361,6 +362,22 @@ By default all parameters in the postman collection that has the field `"disable
361
362
362
363
Please have a look to the [Parameters parsing](#parameters-parsing) section about duplicated parameters names in Headers and Query, this will apply also to the disabled parameters when using this feature.
363
364
365
+
### operationId (string)
366
+
367
+
In OpenAPI the [operationId](https://swagger.io/specification/#operation-object) is a unique id that is used mainly for Tools and libraries to uniquely identify an operation, with this option you can indicate the strategy to provide this value for each request operation, the possible values are:
|`off`| Default. No `operationId` will be added. |
372
+
|`auto`| The field `name` of the request will transformed as [Camel case](https://es.wikipedia.org/wiki/Camel_ca) and used as `operationId`. |
373
+
|`brackets`| Will look for a name between brackets in the fields `name` of the request and use this as `operationId`. |
374
+
375
+
As an example of option `auto` if you have in a postman collection a request with name `Create new User` the resulting operation id will be `createNewUser`.
376
+
377
+
To use option `brackets` you should add the desired operation id between brackets in the name of the request, so for example if you use as request name `Create new User [newUser]`, the text `newUser` will be used as operation id, the library automatically will remove the literal `[newUser]` from the name and will no appear in the `summary` field in the OpenAPI yaml.
378
+
379
+
> **Note about duplications:** As described in OpenAPI about the operationId, "The id MUST be unique among all operations described in the API." but the library does not ensure the uniqueness, so before do the conversion check that you are using unique operations ids for each request in your collection.
0 commit comments