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
When importing an API, you might encounter some restrictions or need to identify and rectify issues before you can successfully import. In this article, you'll learn:
25
-
* All the limitations, organized by the import format of the API.
23
+
* API Management's behavior during OpenAPI import.
24
+
* Import limitations, organized by the import format of the API.
26
25
* How OpenAPI export works.
27
26
27
+
## API Management during OpenAPI import
28
+
29
+
During OpenAPI import, API Management:
30
+
* Checks specifically for query string parameters marked as required.
31
+
* Converts the query string parameters to template parameters.
32
+
33
+
If you prefer a different behavior, you can either:
34
+
* Manually change via form-based editor, or
35
+
* Remove the "required" attribute from the OpenAPI definition, thus not converting them to template parameters.
If you receive errors while importing your OpenAPI document, make sure you've validated it beforehand by either:
@@ -33,44 +42,85 @@ If you receive errors while importing your OpenAPI document, make sure you've va
33
42
34
43
### <aname="open-api-general"> </a>General
35
44
36
-
- Required parameters across both path and query must have unique names.
37
-
- In OpenAPI, a parameter name only needs to be unique within a location, for example path, query, header.
38
-
- In API Management, we allow operations to be discriminated by both path and query parameters.
39
-
- Since OpenAPI doesn't support this, we require parameter names to be unique within the entire URL template.
40
-
- When imported inline to API Management, an OpenAPI specification can be up to 4 MB in size.
41
-
- The size limit doesn't apply when an OpenAPI document is provided via a URL to a location accessible from your API Management service.
42
-
-`\$ref` pointers can't reference external files.
43
-
- The only supported extensions are:
44
-
-`x-ms-paths`
45
-
-`x-servers`
46
-
- Custom extensions:
47
-
- Ignored on import.
48
-
- Aren't saved or preserved for export.
49
-
- Security definitions are ignored.
50
-
-`Recursion`:
51
-
- API Management doesn't support definitions defined recursively.
52
-
- For example, schemas referring to themselves.
53
-
-`server` object isn't supported on the API operation level.
54
-
-`Produces` keyword (which describes MIME types returned by an API) isn't supported.
55
-
- Available source file URL is applied to relative server URLs.
56
-
- Inline schema definitions for API operations aren't supported. Schema definitions:
57
-
- Are defined in the API scope.
58
-
- Can be referenced in API operations request or response scopes.
59
-
- A defined URL parameter needs to be part of the URL template.
45
+
#### URL template requirements
46
+
47
+
| Requirement | Description |
48
+
| ----------- | ----------- |
49
+
|**Unique names for required path and query parameters**| In OpenAPI: <ul><li>A parameter name only needs to be unique within a location, for example path, query, header.</li></ul>In API Management:<ul><li>We allow operations to be discriminated by both path and query parameters.</li><li>OpenAPI doesn't support this discrimination, so we require parameter names to be unique within the entire URL template.</li></ul> |
50
+
|**Defined URL parameter**| Must be part of the URL template. |
51
+
|**Available source file URL**| Applied to relative server URLs. |
OpenAPI version 3.1 is currently not supported in API Management.
64
+
65
+
**Size limitations**
66
+
67
+
| Size limit | Description |
68
+
| ---------- | ----------- |
69
+
|**Up to 4 MB**| When an OpenAPI specification is imported inline to API Management. |
70
+
|**Size limit doesn't apply**| When an OpenAPI document is provided via a URL to a location accessible from your API Management service. |
71
+
72
+
#### Supported extensions
73
+
The only supported extensions are:
74
+
75
+
| Extension | Description |
76
+
| ----------- | ----------- |
77
+
|**`x-ms-paths`**| <ul><li>Allows you to define paths that are differentiated by query parameters in the URL.</li><li>Covered in the [AutoRest docs](https://github.com/Azure/autorest/tree/main/docs/extensions#x-ms-paths).</li></ul> |
78
+
|**`x-servers`**| A backport of the [OpenAPI 3 `servers` object](https://swagger.io/docs/specification/api-host-and-base-path/) for OpenAPI 2. |
79
+
80
+
#### Unsupported extensions
81
+
| Extension | Description |
82
+
| ----------- | ----------- |
83
+
|**`Recursion`**| API Management doesn't support definitions defined recursively.<br />For example, schemas referring to themselves. |
84
+
|**`Server` object**| Not supported on the API operation level. |
85
+
|**`Produces` keyword**| Describes MIME types returned by an API. <br />Not supported. |
86
+
87
+
#### Custom extensions
88
+
- Are ignored on import.
89
+
- Aren't saved or preserved for export.
90
+
91
+
#### Unsupported definitions
92
+
Inline schema definitions for API operations aren't supported. Schema definitions:
93
+
- Are defined in the API scope.
94
+
- Can be referenced in API operations request or response scopes.
95
+
96
+
#### Ignored definitions
97
+
Security definitions are ignored.
60
98
61
99
### <aname="open-api-v2"> </a>OpenAPI version 2
62
100
63
101
OpenAPI version 2 support is limited to JSON format only.
64
102
65
-
### <aname="open-api-v3"> </a>OpenAPI version 3
103
+
### <aname="open-api-v3"> </a>OpenAPI version 3.0.x
66
104
67
-
- If multiple `servers` are specified, API Management will use the first HTTPS URL it finds.
105
+
The latest supported OpenAPI version 3.0 is 3.0.3.
106
+
107
+
#### HTTPS URLs
108
+
- If multiple `servers` are specified, API Management will use the first HTTPS URL it finds.
68
109
- If there aren't any HTTPS URLs, the server URL will be empty.
69
-
-`Examples` isn't supported, but `example` is.
70
-
- The following fields are included in OpenAPI version 3.x, but are not supported:
71
-
-`explode`
72
-
-`style`
73
-
-`allowReserved`
110
+
111
+
#### Supported
112
+
-`example`
113
+
114
+
#### Unsupported
115
+
The following fields are included in [OpenAPI version 3.0.x](https://swagger.io/specification/), but are not supported:
@@ -80,15 +130,21 @@ API definitions exported from an API Management service are:
80
130
* Primarily intended for external applications that need to call the API hosted in API Management service.
81
131
* Not intended to be imported into the same or different API Management service.
82
132
83
-
For configuration management of API definitions across different services/environments, please refer to documentation regarding using API Management Service with Git.
133
+
For configuration management of API definitions across different services/environments, refer to documentation regarding using API Management service with Git.
84
134
85
135
### Add new API via OpenAPI import
86
136
87
-
For each operation found in the OpenAPI document, a new operation will be created with Azure resource name and display name set to `operationId` and `summary`, respectively.
88
-
*`operationId` value is normalized.
89
-
* If `operationId` isn't specified (not present, `null`, or empty), Azure resource name value will be generated by combining HTTP method and path template, for example, `get-foo`.
90
-
*`summary` value is imported as-is and its length is limited to 300 characters.
91
-
* If `summary` isn't specified (not present, `null`, or empty), `display name` value will set to `operationId`.
137
+
For each operation found in the OpenAPI document, a new operation will be created with:
138
+
* Azure resource name set to `operationId`.
139
+
*`operationId` value is normalized.
140
+
* If `operationId` isn't specified (not present, `null`, or empty), Azure resource name value will be generated by combining HTTP method and path template.
141
+
* For example, `get-foo`.
142
+
143
+
* Display name set to `summary`.
144
+
*`summary` value:
145
+
* Imported as-is.
146
+
* Length is limited to 300 characters.
147
+
* If `summary` isn't specified (not present, `null`, or empty), display name value will set to `operationId`.
92
148
93
149
### Update an existing API via OpenAPI import
94
150
@@ -110,7 +166,7 @@ To make import more predictable, follow these guidelines:
110
166
111
167
### Export API as OpenAPI
112
168
113
-
Each operation's:
169
+
For each operation, its:
114
170
* Azure resource name will be exported as an `operationId`.
115
171
* Display name will be exported as a `summary`.
116
172
@@ -127,29 +183,35 @@ Each operation's:
127
183
128
184
You can create SOAP pass-through and SOAP-to-REST APIs with WSDL files.
129
185
130
-
-**SOAP bindings**
131
-
- Only SOAP bindings of "document" and “literal” encoding style are supported.
132
-
- No support for “rpc” style or SOAP-Encoding.
133
-
-**WSDL:Import**
134
-
- Not supported. Instead, merge the imports into one document.
135
-
-**Messages with multiple parts**
136
-
- This message type is not supported.
137
-
-**WCF wsHttpBinding**
138
-
- SOAP services created with Windows Communication Foundation should use `basicHttpBinding`.
139
-
-`wsHttpBinding` isn't supported.
140
-
-**MTOM**
141
-
- Services using `MTOM`*may* work.
142
-
- Official support isn't offered at this time.
143
-
-**Recursion**
144
-
- Types defined recursively are not supported by API Management.
145
-
- For example, refer to an array of themselves.
146
-
-**Multiple Namespaces**
147
-
- While multiple namespaces can be used in a schema, only the target namespace can be used to define message parts.
148
-
- Namespaces other than the target are not preserved.
149
-
- These namespaces are used to define other input or output elements.
150
-
- Although such a WSDL document can be imported, on export, all message parts will have the WSDL target namespace.
151
-
-**Arrays**
152
-
- SOAP-to-REST transformation supports only wrapped arrays shown in the example below:
186
+
### SOAP bindings
187
+
- Only SOAP bindings of "document" and “literal” encoding style are supported.
188
+
- No support for “rpc” style or SOAP-Encoding.
189
+
190
+
### WSDL:Import
191
+
Not supported. Instead, merge the imports into one document.
192
+
193
+
### Messages with multiple parts
194
+
This message type is not supported.
195
+
196
+
### WCF wsHttpBinding
197
+
- SOAP services created with Windows Communication Foundation should use `basicHttpBinding`.
198
+
-`wsHttpBinding` isn't supported.
199
+
200
+
### MTOM
201
+
- Services using `MTOM`*may* work.
202
+
- Official support isn't offered at this time.
203
+
204
+
### Recursion
205
+
- Types defined recursively are not supported by API Management.
206
+
- For example, refer to an array of themselves.
207
+
208
+
### Multiple Namespaces
209
+
While multiple namespaces can be used in a schema, only the target namespace can be used to define message parts. These namespaces are used to define other input or output elements.
210
+
211
+
Namespaces other than the target are not preserved on export. While you can import a WSDL document defining message parts with other namespaces, all message parts will have the WSDL target namespace on export.
212
+
213
+
### Arrays
214
+
SOAP-to-REST transformation supports only wrapped arrays shown in the example below:
0 commit comments