Fix modular template to always generate class property syntax #2550
Triggered via pull request
September 10, 2025 15:05
Status
Failure
Total duration
1m 10s
Artifacts
–
Annotations
6 errors
|
build-and-test (24)
Process completed with exit code 1.
|
|
tests/spec/modular/basic.test.ts > basic > modular:
tests/spec/modular/basic.test.ts#L39
Error: Snapshot `basic > modular > api 1` mismatched
- Expected
+ Received
@@ -8,431 +8,355 @@
* ## AUTHOR: acacode ##
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/
- import { ApiResponse, Currency, Order, Pet, User } from "./data-contracts";
- import { ContentType, HttpClient, RequestParams } from "./http-client";
+
+
+ import { HttpClient, RequestParams, ContentType, HttpResponse } from "./http-client";
+ import { PetIds, PetNames, Order, Category, User, Tag, Pet, ApiResponse, Amount, Currency } from "./data-contracts"
- export class Api<
- SecurityDataType = unknown,
- > extends HttpClient<SecurityDataType> {
+ export class Api<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
- /**
+
+ /**
- * No description
+ * No description
- *
- * @tags pet
+ *
+ * @tags pet
- * @name AddPet
+ * @name AddPet
- * @summary Add a new pet to the store
+ * @summary Add a new pet to the store
- * @request POST:api/v1/pet
+ * @request POST:api/v1/pet
- * @secure
+ * @secure
- */
+ */
- addPet = (body: Pet, params: RequestParams = {}) =>
+ addPet: (body: Pet, params: RequestParams = {}) =>
this.request<any, void>({
- path: `api/v1/pet`,
+ path: `api/v1/pet`,
- method: "POST",
+ method: 'POST',
- body: body,
- secure: true,
- type: ContentType.Json,
- ...params,
+ body: body, secure: true, type: ContentType.Json, ...params,
- });
- /**
+ }), /**
- * No description
+ * No description
- *
+ *
- * @tags pet
+ * @tags pet
- * @name UpdatePet
+ * @name UpdatePet
- * @summary Update an existing pet
+ * @summary Update an existing pet
- * @request PUT:api/v1/pet
+ * @request PUT:api/v1/pet
- * @secure
+ * @secure
- */
+ */
- updatePet = (body: Pet, params: RequestParams = {}) =>
+ updatePet: (body: Pet, params: RequestParams = {}) =>
this.request<any, void>({
- path: `api/v1/pet`,
+ path: `api/v1/pet`,
- method: "PUT",
+ method: 'PUT',
- body: body,
- secure: true,
- type: ContentType.Json,
- ...params,
+ body: body, secure: true, type: ContentType.Json, ...params,
- });
- /**
+ }), /**
- * @description Multiple status values can be provided with comma separated strings
+ * @description Multiple status values can be provided with comma separated strings
- *
+ *
- * @tags pet
+ * @tags pet
- * @name FindPetsByStatus
+ * @name FindPetsByStatus
- * @summary Finds Pets by status
+ * @summary Finds Pets by status
- * @request GET:api/v1/pet/findByStatus
+ * @request GET:api/v1/pet/findByStatus
- * @secure
+ * @secure
- */
+ */
- findPetsByStatus = (
- query: {
+ findPetsByStatus: (query: {
- /** Status values that need to be considered for filter */
+ /** Status values that need to be considered for filter */
- status: ("available" | "pending" | "sold")[];
- },
- params: RequestParams = {},
- ) =>
+ status: ("available" | "pending" | "sold")[],
+
+ }, params: RequestParams = {}) =>
- this.request<Pet[], void>({
+ this.request<(Pet)[], void>({
- path: `api/v1/pet/findByStatus`,
+ path: `api/v1/pet/findByStatus`,
- method: "GET",
+ method: 'GET',
- query: query,
- secure: true,
- format: "json",
- ...params,
+ query: query, secure: true, format: "json", ...params,
- });
- /**
+ }), /**
- * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
- *
+ *
- * @tags pet
+ * @tags pet
- * @name FindPetsByTag
|
|
build-and-test (22)
Process completed with exit code 1.
|
|
tests/spec/modular/basic.test.ts > basic > modular:
tests/spec/modular/basic.test.ts#L39
Error: Snapshot `basic > modular > api 1` mismatched
- Expected
+ Received
@@ -8,431 +8,355 @@
* ## AUTHOR: acacode ##
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/
- import { ApiResponse, Currency, Order, Pet, User } from "./data-contracts";
- import { ContentType, HttpClient, RequestParams } from "./http-client";
+
+
+ import { HttpClient, RequestParams, ContentType, HttpResponse } from "./http-client";
+ import { PetIds, PetNames, Order, Category, User, Tag, Pet, ApiResponse, Amount, Currency } from "./data-contracts"
- export class Api<
- SecurityDataType = unknown,
- > extends HttpClient<SecurityDataType> {
+ export class Api<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
- /**
+
+ /**
- * No description
+ * No description
- *
- * @tags pet
+ *
+ * @tags pet
- * @name AddPet
+ * @name AddPet
- * @summary Add a new pet to the store
+ * @summary Add a new pet to the store
- * @request POST:api/v1/pet
+ * @request POST:api/v1/pet
- * @secure
+ * @secure
- */
+ */
- addPet = (body: Pet, params: RequestParams = {}) =>
+ addPet: (body: Pet, params: RequestParams = {}) =>
this.request<any, void>({
- path: `api/v1/pet`,
+ path: `api/v1/pet`,
- method: "POST",
+ method: 'POST',
- body: body,
- secure: true,
- type: ContentType.Json,
- ...params,
+ body: body, secure: true, type: ContentType.Json, ...params,
- });
- /**
+ }), /**
- * No description
+ * No description
- *
+ *
- * @tags pet
+ * @tags pet
- * @name UpdatePet
+ * @name UpdatePet
- * @summary Update an existing pet
+ * @summary Update an existing pet
- * @request PUT:api/v1/pet
+ * @request PUT:api/v1/pet
- * @secure
+ * @secure
- */
+ */
- updatePet = (body: Pet, params: RequestParams = {}) =>
+ updatePet: (body: Pet, params: RequestParams = {}) =>
this.request<any, void>({
- path: `api/v1/pet`,
+ path: `api/v1/pet`,
- method: "PUT",
+ method: 'PUT',
- body: body,
- secure: true,
- type: ContentType.Json,
- ...params,
+ body: body, secure: true, type: ContentType.Json, ...params,
- });
- /**
+ }), /**
- * @description Multiple status values can be provided with comma separated strings
+ * @description Multiple status values can be provided with comma separated strings
- *
+ *
- * @tags pet
+ * @tags pet
- * @name FindPetsByStatus
+ * @name FindPetsByStatus
- * @summary Finds Pets by status
+ * @summary Finds Pets by status
- * @request GET:api/v1/pet/findByStatus
+ * @request GET:api/v1/pet/findByStatus
- * @secure
+ * @secure
- */
+ */
- findPetsByStatus = (
- query: {
+ findPetsByStatus: (query: {
- /** Status values that need to be considered for filter */
+ /** Status values that need to be considered for filter */
- status: ("available" | "pending" | "sold")[];
- },
- params: RequestParams = {},
- ) =>
+ status: ("available" | "pending" | "sold")[],
+
+ }, params: RequestParams = {}) =>
- this.request<Pet[], void>({
+ this.request<(Pet)[], void>({
- path: `api/v1/pet/findByStatus`,
+ path: `api/v1/pet/findByStatus`,
- method: "GET",
+ method: 'GET',
- query: query,
- secure: true,
- format: "json",
- ...params,
+ query: query, secure: true, format: "json", ...params,
- });
- /**
+ }), /**
- * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
- *
+ *
- * @tags pet
+ * @tags pet
- * @name FindPetsByTag
|
|
build-and-test (20)
Process completed with exit code 1.
|
|
tests/spec/modular/basic.test.ts > basic > modular:
tests/spec/modular/basic.test.ts#L39
Error: Snapshot `basic > modular > api 1` mismatched
- Expected
+ Received
@@ -8,431 +8,355 @@
* ## AUTHOR: acacode ##
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/
- import { ApiResponse, Currency, Order, Pet, User } from "./data-contracts";
- import { ContentType, HttpClient, RequestParams } from "./http-client";
+
+
+ import { HttpClient, RequestParams, ContentType, HttpResponse } from "./http-client";
+ import { PetIds, PetNames, Order, Category, User, Tag, Pet, ApiResponse, Amount, Currency } from "./data-contracts"
- export class Api<
- SecurityDataType = unknown,
- > extends HttpClient<SecurityDataType> {
+ export class Api<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
- /**
+
+ /**
- * No description
+ * No description
- *
- * @tags pet
+ *
+ * @tags pet
- * @name AddPet
+ * @name AddPet
- * @summary Add a new pet to the store
+ * @summary Add a new pet to the store
- * @request POST:api/v1/pet
+ * @request POST:api/v1/pet
- * @secure
+ * @secure
- */
+ */
- addPet = (body: Pet, params: RequestParams = {}) =>
+ addPet: (body: Pet, params: RequestParams = {}) =>
this.request<any, void>({
- path: `api/v1/pet`,
+ path: `api/v1/pet`,
- method: "POST",
+ method: 'POST',
- body: body,
- secure: true,
- type: ContentType.Json,
- ...params,
+ body: body, secure: true, type: ContentType.Json, ...params,
- });
- /**
+ }), /**
- * No description
+ * No description
- *
+ *
- * @tags pet
+ * @tags pet
- * @name UpdatePet
+ * @name UpdatePet
- * @summary Update an existing pet
+ * @summary Update an existing pet
- * @request PUT:api/v1/pet
+ * @request PUT:api/v1/pet
- * @secure
+ * @secure
- */
+ */
- updatePet = (body: Pet, params: RequestParams = {}) =>
+ updatePet: (body: Pet, params: RequestParams = {}) =>
this.request<any, void>({
- path: `api/v1/pet`,
+ path: `api/v1/pet`,
- method: "PUT",
+ method: 'PUT',
- body: body,
- secure: true,
- type: ContentType.Json,
- ...params,
+ body: body, secure: true, type: ContentType.Json, ...params,
- });
- /**
+ }), /**
- * @description Multiple status values can be provided with comma separated strings
+ * @description Multiple status values can be provided with comma separated strings
- *
+ *
- * @tags pet
+ * @tags pet
- * @name FindPetsByStatus
+ * @name FindPetsByStatus
- * @summary Finds Pets by status
+ * @summary Finds Pets by status
- * @request GET:api/v1/pet/findByStatus
+ * @request GET:api/v1/pet/findByStatus
- * @secure
+ * @secure
- */
+ */
- findPetsByStatus = (
- query: {
+ findPetsByStatus: (query: {
- /** Status values that need to be considered for filter */
+ /** Status values that need to be considered for filter */
- status: ("available" | "pending" | "sold")[];
- },
- params: RequestParams = {},
- ) =>
+ status: ("available" | "pending" | "sold")[],
+
+ }, params: RequestParams = {}) =>
- this.request<Pet[], void>({
+ this.request<(Pet)[], void>({
- path: `api/v1/pet/findByStatus`,
+ path: `api/v1/pet/findByStatus`,
- method: "GET",
+ method: 'GET',
- query: query,
- secure: true,
- format: "json",
- ...params,
+ query: query, secure: true, format: "json", ...params,
- });
- /**
+ }), /**
- * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+ * @description Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
- *
+ *
- * @tags pet
+ * @tags pet
- * @name FindPetsByTag
|