diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache index c3ac784124a2..cdecfdd44497 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/encoder.mustache @@ -14,7 +14,9 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); @@ -31,7 +33,9 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { export class CustomQueryEncoderHelper extends QueryEncoder { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v2/default/encoder.ts b/samples/client/petstore/typescript-angular-v2/default/encoder.ts index 6fcda7b246dd..71f99f9c7041 100644 --- a/samples/client/petstore/typescript-angular-v2/default/encoder.ts +++ b/samples/client/petstore/typescript-angular-v2/default/encoder.ts @@ -8,7 +8,9 @@ export class CustomQueryEncoderHelper extends QueryEncoder { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/encoder.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/encoder.ts index 6fcda7b246dd..71f99f9c7041 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/encoder.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/encoder.ts @@ -8,7 +8,9 @@ export class CustomQueryEncoderHelper extends QueryEncoder { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/encoder.ts b/samples/client/petstore/typescript-angular-v4.3/npm/encoder.ts index f1c6b78c9c8e..7f1ef7c4f2a3 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/encoder.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/encoder.ts @@ -8,7 +8,9 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v4/npm/encoder.ts b/samples/client/petstore/typescript-angular-v4/npm/encoder.ts index 6fcda7b246dd..71f99f9c7041 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/encoder.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/encoder.ts @@ -8,7 +8,9 @@ export class CustomQueryEncoderHelper extends QueryEncoder { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/encoder.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/encoder.ts index f1c6b78c9c8e..7f1ef7c4f2a3 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/encoder.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/encoder.ts @@ -8,7 +8,9 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/encoder.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/encoder.ts index f1c6b78c9c8e..7f1ef7c4f2a3 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/encoder.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/encoder.ts @@ -8,7 +8,9 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/encoder.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/encoder.ts index f1c6b78c9c8e..7f1ef7c4f2a3 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/encoder.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/encoder.ts @@ -8,7 +8,9 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/encoder.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/encoder.ts index f1c6b78c9c8e..7f1ef7c4f2a3 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/encoder.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/encoder.ts @@ -8,7 +8,9 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/encoder.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/encoder.ts index f1c6b78c9c8e..7f1ef7c4f2a3 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/encoder.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/encoder.ts @@ -8,7 +8,9 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/encoder.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/encoder.ts index f1c6b78c9c8e..7f1ef7c4f2a3 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/encoder.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/encoder.ts @@ -8,7 +8,9 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/encoder.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/encoder.ts index f1c6b78c9c8e..7f1ef7c4f2a3 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/encoder.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/encoder.ts @@ -8,7 +8,9 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/encoder.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/encoder.ts index f1c6b78c9c8e..7f1ef7c4f2a3 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/encoder.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/encoder.ts @@ -8,7 +8,9 @@ export class CustomHttpUrlEncodingCodec extends HttpUrlEncodingCodec { encodeKey(k: string): string { k = super.encodeKey(k); - return k.replace(/\+/gi, '%2B'); + return k.replace(/\+/gi, '%2B') + .replace(/%5B/, "[").replace(/%5D/, "]") + ; } encodeValue(v: string): string { v = super.encodeValue(v);