diff --git a/bin/configs/typescript-fetch-default.yaml b/bin/configs/typescript-fetch-default.yaml index 1a61fc45e01e..921ceec1e079 100644 --- a/bin/configs/typescript-fetch-default.yaml +++ b/bin/configs/typescript-fetch-default.yaml @@ -2,3 +2,9 @@ generatorName: typescript-fetch outputDir: samples/client/petstore/typescript-fetch/builds/default inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/typescript-fetch +additionalProperties: + npmVersion: 1.0.0 + supportsES6: true + npmName: '@openapitools/typescript-fetch-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/FILES b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/FILES index 946584cc4cc9..b7078082a023 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/FILES +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/FILES @@ -1,7 +1,6 @@ -apis/PetApi.ts -apis/StoreApi.ts -apis/UserApi.ts -apis/index.ts +.gitignore +.npmignore +README.md docs/Category.md docs/ModelApiResponse.md docs/Order.md @@ -11,12 +10,19 @@ docs/StoreApi.md docs/Tag.md docs/User.md docs/UserApi.md -index.ts -models/Category.ts -models/ModelApiResponse.ts -models/Order.ts -models/Pet.ts -models/Tag.ts -models/User.ts -models/index.ts -runtime.ts +package.json +src/apis/PetApi.ts +src/apis/StoreApi.ts +src/apis/UserApi.ts +src/apis/index.ts +src/index.ts +src/models/Category.ts +src/models/ModelApiResponse.ts +src/models/Order.ts +src/models/Pet.ts +src/models/Tag.ts +src/models/User.ts +src/models/index.ts +src/runtime.ts +tsconfig.esm.json +tsconfig.json diff --git a/samples/client/petstore/typescript-fetch/builds/default/docs/Category.md b/samples/client/petstore/typescript-fetch/builds/default/docs/Category.md index 3666c22c002a..6b1d545b2f35 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/docs/Category.md +++ b/samples/client/petstore/typescript-fetch/builds/default/docs/Category.md @@ -13,7 +13,7 @@ Name | Type ## Example ```typescript -import type { Category } from '' +import type { Category } from '@openapitools/typescript-fetch-petstore' // TODO: Update the object below with actual values const example = { diff --git a/samples/client/petstore/typescript-fetch/builds/default/docs/ModelApiResponse.md b/samples/client/petstore/typescript-fetch/builds/default/docs/ModelApiResponse.md index 77430704bd2a..2583fa00e7a3 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/docs/ModelApiResponse.md +++ b/samples/client/petstore/typescript-fetch/builds/default/docs/ModelApiResponse.md @@ -14,7 +14,7 @@ Name | Type ## Example ```typescript -import type { ModelApiResponse } from '' +import type { ModelApiResponse } from '@openapitools/typescript-fetch-petstore' // TODO: Update the object below with actual values const example = { diff --git a/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md b/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md index e2527b3aa31c..3c1be2566f70 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md +++ b/samples/client/petstore/typescript-fetch/builds/default/docs/Order.md @@ -17,7 +17,7 @@ Name | Type ## Example ```typescript -import type { Order } from '' +import type { Order } from '@openapitools/typescript-fetch-petstore' // TODO: Update the object below with actual values const example = { diff --git a/samples/client/petstore/typescript-fetch/builds/default/docs/Pet.md b/samples/client/petstore/typescript-fetch/builds/default/docs/Pet.md index 5cff690c1f62..221555445c78 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/docs/Pet.md +++ b/samples/client/petstore/typescript-fetch/builds/default/docs/Pet.md @@ -17,7 +17,7 @@ Name | Type ## Example ```typescript -import type { Pet } from '' +import type { Pet } from '@openapitools/typescript-fetch-petstore' // TODO: Update the object below with actual values const example = { diff --git a/samples/client/petstore/typescript-fetch/builds/default/docs/PetApi.md b/samples/client/petstore/typescript-fetch/builds/default/docs/PetApi.md index 2827a301c5e3..b642fb6bcef5 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/docs/PetApi.md +++ b/samples/client/petstore/typescript-fetch/builds/default/docs/PetApi.md @@ -27,11 +27,11 @@ Add a new pet to the store import { Configuration, PetApi, -} from ''; -import type { AddPetRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { AddPetRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const config = new Configuration({ // To configure OAuth2 access token for authorization: petstore_auth implicit accessToken: "YOUR ACCESS TOKEN", @@ -96,11 +96,11 @@ Deletes a pet import { Configuration, PetApi, -} from ''; -import type { DeletePetRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { DeletePetRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const config = new Configuration({ // To configure OAuth2 access token for authorization: petstore_auth implicit accessToken: "YOUR ACCESS TOKEN", @@ -170,11 +170,11 @@ Multiple status values can be provided with comma separated strings import { Configuration, PetApi, -} from ''; -import type { FindPetsByStatusRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { FindPetsByStatusRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const config = new Configuration({ // To configure OAuth2 access token for authorization: petstore_auth implicit accessToken: "YOUR ACCESS TOKEN", @@ -242,11 +242,11 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 import { Configuration, PetApi, -} from ''; -import type { FindPetsByTagsRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { FindPetsByTagsRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const config = new Configuration({ // To configure OAuth2 access token for authorization: petstore_auth implicit accessToken: "YOUR ACCESS TOKEN", @@ -314,11 +314,11 @@ Returns a single pet import { Configuration, PetApi, -} from ''; -import type { GetPetByIdRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { GetPetByIdRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const config = new Configuration({ // To configure API key authorization: api_key apiKey: "YOUR API KEY", @@ -385,11 +385,11 @@ Update an existing pet import { Configuration, PetApi, -} from ''; -import type { UpdatePetRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { UpdatePetRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const config = new Configuration({ // To configure OAuth2 access token for authorization: petstore_auth implicit accessToken: "YOUR ACCESS TOKEN", @@ -456,11 +456,11 @@ Updates a pet in the store with form data import { Configuration, PetApi, -} from ''; -import type { UpdatePetWithFormRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { UpdatePetWithFormRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const config = new Configuration({ // To configure OAuth2 access token for authorization: petstore_auth implicit accessToken: "YOUR ACCESS TOKEN", @@ -531,11 +531,11 @@ uploads an image import { Configuration, PetApi, -} from ''; -import type { UploadFileRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { UploadFileRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const config = new Configuration({ // To configure OAuth2 access token for authorization: petstore_auth implicit accessToken: "YOUR ACCESS TOKEN", diff --git a/samples/client/petstore/typescript-fetch/builds/default/docs/StoreApi.md b/samples/client/petstore/typescript-fetch/builds/default/docs/StoreApi.md index ceb7e08b016e..fea668fdac48 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/docs/StoreApi.md +++ b/samples/client/petstore/typescript-fetch/builds/default/docs/StoreApi.md @@ -25,11 +25,11 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or import { Configuration, StoreApi, -} from ''; -import type { DeleteOrderRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { DeleteOrderRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const api = new StoreApi(); const body = { @@ -93,11 +93,11 @@ Returns a map of status codes to quantities import { Configuration, StoreApi, -} from ''; -import type { GetInventoryRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { GetInventoryRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const config = new Configuration({ // To configure API key authorization: api_key apiKey: "YOUR API KEY", @@ -156,11 +156,11 @@ For valid response try integer IDs with value <= 5 or > 10. Other val import { Configuration, StoreApi, -} from ''; -import type { GetOrderByIdRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { GetOrderByIdRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const api = new StoreApi(); const body = { @@ -223,11 +223,11 @@ Place an order for a pet import { Configuration, StoreApi, -} from ''; -import type { PlaceOrderRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { PlaceOrderRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const api = new StoreApi(); const body = { diff --git a/samples/client/petstore/typescript-fetch/builds/default/docs/Tag.md b/samples/client/petstore/typescript-fetch/builds/default/docs/Tag.md index e6c34b2dab01..d112fe3b95e5 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/docs/Tag.md +++ b/samples/client/petstore/typescript-fetch/builds/default/docs/Tag.md @@ -13,7 +13,7 @@ Name | Type ## Example ```typescript -import type { Tag } from '' +import type { Tag } from '@openapitools/typescript-fetch-petstore' // TODO: Update the object below with actual values const example = { diff --git a/samples/client/petstore/typescript-fetch/builds/default/docs/User.md b/samples/client/petstore/typescript-fetch/builds/default/docs/User.md index af455b7cf7b2..98bd755583d5 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/docs/User.md +++ b/samples/client/petstore/typescript-fetch/builds/default/docs/User.md @@ -19,7 +19,7 @@ Name | Type ## Example ```typescript -import type { User } from '' +import type { User } from '@openapitools/typescript-fetch-petstore' // TODO: Update the object below with actual values const example = { diff --git a/samples/client/petstore/typescript-fetch/builds/default/docs/UserApi.md b/samples/client/petstore/typescript-fetch/builds/default/docs/UserApi.md index 7d2b3fa00c39..9d42e138d5b1 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/docs/UserApi.md +++ b/samples/client/petstore/typescript-fetch/builds/default/docs/UserApi.md @@ -29,11 +29,11 @@ This can only be done by the logged in user. import { Configuration, UserApi, -} from ''; -import type { CreateUserRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { CreateUserRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const api = new UserApi(); const body = { @@ -94,11 +94,11 @@ Creates list of users with given input array import { Configuration, UserApi, -} from ''; -import type { CreateUsersWithArrayInputRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { CreateUsersWithArrayInputRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const api = new UserApi(); const body = { @@ -159,11 +159,11 @@ Creates list of users with given input array import { Configuration, UserApi, -} from ''; -import type { CreateUsersWithListInputRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { CreateUsersWithListInputRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const api = new UserApi(); const body = { @@ -226,11 +226,11 @@ This can only be done by the logged in user. import { Configuration, UserApi, -} from ''; -import type { DeleteUserRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { DeleteUserRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const api = new UserApi(); const body = { @@ -292,11 +292,11 @@ Get user by user name import { Configuration, UserApi, -} from ''; -import type { GetUserByNameRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { GetUserByNameRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const api = new UserApi(); const body = { @@ -359,11 +359,11 @@ Logs user into the system import { Configuration, UserApi, -} from ''; -import type { LoginUserRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { LoginUserRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const api = new UserApi(); const body = { @@ -428,11 +428,11 @@ Logs out current logged in user session import { Configuration, UserApi, -} from ''; -import type { LogoutUserRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { LogoutUserRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const api = new UserApi(); try { @@ -487,11 +487,11 @@ This can only be done by the logged in user. import { Configuration, UserApi, -} from ''; -import type { UpdateUserRequest } from ''; +} from '@openapitools/typescript-fetch-petstore'; +import type { UpdateUserRequest } from '@openapitools/typescript-fetch-petstore'; async function example() { - console.log("🚀 Testing SDK..."); + console.log("🚀 Testing @openapitools/typescript-fetch-petstore SDK..."); const api = new UserApi(); const body = {