Skip to content

Commit 7d8fcc1

Browse files
authored
Merge pull request #195038 from adrianhall/apim-oas-fix
Fixed where normalization happens
2 parents e07a7fc + 5358edc commit 7d8fcc1

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

articles/api-management/api-management-api-import-restrictions.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,15 @@ For each operation found in the OpenAPI document, a new operation will be create
141141
* Length is limited to 300 characters.
142142
* If `summary` isn't specified (not present, `null`, or empty), display name value will set to `operationId`.
143143

144+
**Normalization rules for `operationId`**
145+
- Convert to lower case.
146+
- Replace each sequence of non-alphanumeric characters with a single dash.
147+
- For example, `GET-/foo/{bar}?buzz={quix}` will be transformed into `get-foo-bar-buzz-quix-`.
148+
- Trim dashes on both sides.
149+
- For example, `get-foo-bar-buzz-quix-` will become `get-foo-bar-buzz-quix`
150+
- Truncate to fit 76 characters, four characters less than maximum limit for a resource name.
151+
- Use remaining four characters for a de-duplication suffix, if necessary, in the form of `-1, -2, ..., -999`.
152+
144153
### Update an existing API via OpenAPI import
145154

146155
During import, the existing API operation:
@@ -159,12 +168,6 @@ To make import more predictable, follow these guidelines:
159168
- Refrain from changing `operationId` after initial import.
160169
- Never change `operationId` and HTTP method or path template at the same time.
161170

162-
### Export API as OpenAPI
163-
164-
For each operation, its:
165-
* Azure resource name will be exported as an `operationId`.
166-
* Display name will be exported as a `summary`.
167-
168171
**Normalization rules for `operationId`**
169172
- Convert to lower case.
170173
- Replace each sequence of non-alphanumeric characters with a single dash.
@@ -174,6 +177,14 @@ For each operation, its:
174177
- Truncate to fit 76 characters, four characters less than maximum limit for a resource name.
175178
- Use remaining four characters for a de-duplication suffix, if necessary, in the form of `-1, -2, ..., -999`.
176179

180+
### Export API as OpenAPI
181+
182+
For each operation, its:
183+
* Azure resource name will be exported as an `operationId`.
184+
* Display name will be exported as a `summary`.
185+
186+
Note that normalization of the `operationId` is done on import, not on export.
187+
177188
## <a name="wsdl"> </a>WSDL
178189

179190
You can create [SOAP pass-through](import-soap-api.md) and [SOAP-to-REST](restify-soap-api.md) APIs with WSDL files.

0 commit comments

Comments
 (0)