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
Create an API specification (json or yaml format) containing an endpoint with a parameter whose name contains '[' or ']' character.
Example:
{
"openapi": "3.0.0",
"info": {
"version": "1.0",
"title": "ApiManagement"
},
"paths": {
"/api-management/api-definitions": {
"get": {
"tags": [
"ApiDefinitions"
],
"summary": "Get REST and SOAP APIs",
"description": "Get the list of REST and SOAP APIs that are available for my company",
"operationId": "get-api-management-api-definitions",
"parameters": [
{
"name": "filter[protocol]",
"in": "query",
"description": "Filter by ApiDefinition protocol",
"allowEmptyValue": false,
"schema": {
"enum": [
"REST",
"SOAP",
"1AXML"
],
"example": "REST"
}
}
]
}
}
}
}
Then generate the corresponding sdk.
nx g @ama-sdk/schematics:typescript-core --specPath ./swagger.yaml
Current result
The corresponding generated type does not compile:
/** Enum filter[protocol] used in the ApiDefinitionsApi's getApiManagementApiDefinitions function parameter */exporttypeApiDefinitionsApiGetApiManagementApiDefinitionsFilter[protocol]Enum='REST'|'SOAP'|'1AXML';
Expected result
I would expect a file that at least compile with something like
The corresponding generated type does not compile:
/** Enum filter[protocol] used in the ApiDefinitionsApi's getApiManagementApiDefinitions function parameter */exporttypeApiDefinitionsApiGetApiManagementApiDefinitionsFilterProtocolEnum='REST'|'SOAP'|'1AXML';
Additional comments
According to the Open API guide, it does not seem forbidden to use '[' or ']' special characters in the attribute name
The text was updated successfully, but these errors were encountered:
Package name
core
Package version
11.0.4
Reproduction steps
Create an API specification (json or yaml format) containing an endpoint with a parameter whose name contains '[' or ']' character.
Example:
Then generate the corresponding sdk.
Current result
The corresponding generated type does not compile:
Expected result
I would expect a file that at least compile with something like
The corresponding generated type does not compile:
Additional comments
According to the Open API guide, it does not seem forbidden to use '[' or ']' special characters in the attribute name
The text was updated successfully, but these errors were encountered: