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
Get the ideal name SearchableField_(typeofshopsSubFields)[ngram]_
Replace unexpected characters to match ^[a-zA-Z0-9\.\-_]+$
Current Behavior
[23] build/open-api-definition.json:8:3 at #/components/schemas/SearchableField_(typeofshopsSubFields)%5Bngram%5D_
The map key in schemas "SearchableField_(typeofshopsSubFields)%5Bngram%5D_" does not match the regular expression "^[a-zA-Z0-9\.\-_]+$"
6 | "requestBodies": {},
7 | "responses": {},
8 | "schemas": {
9 | "TotalHitsRelation": {
10 | "type": "string",
Error was generated by the spec-components-invalid-map-name rule.
The types looks like this:
Type gymnastics - there is pretty much no other way to make this work with TSOA):
Sorting
Expected Behavior
Should resolve type to acceptable name:
SearchableField_(typeofshopsSubFields)[ngram]_
^[a-zA-Z0-9\.\-_]+$
Current Behavior
The types looks like this:
Possible Solution
Fix it here:
https://github.com/lukeautry/tsoa/blob/master/packages/cli/src/metadataGeneration/typeResolver.ts#L1104
This should never resolve to invalid name, should always output according to acceptable pattern
"^[a-zA-Z0-9\.\-_]+$"
Steps to Reproduce
See type definitions above.
Context (Environment)
Version of the library:
5.1.1
Version of NodeJS:
v18.16.0
Yarn version:
1.22.19
Detailed Description
Basically we need to do type-gymnastics to resolve the types properly in TSOA.
This causes it to generate bad names which is not accepted by the .
The text was updated successfully, but these errors were encountered: