@aws/nx-plugin 1.0.0-rc.98 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-THIRD-PARTY +11686 -23398
- package/README.md +18 -0
- package/generators.json +7 -0
- package/migrations.json +34 -1
- package/package.json +6 -6
- package/src/agentcore-gateway/schema.json +1 -0
- package/src/agentcore-harness/generator.d.ts +1 -1
- package/src/connection/scaffold-catalog.d.ts +4 -0
- package/src/connection/scaffold-catalog.js +3 -6
- package/src/connection/scaffold-catalog.js.map +1 -1
- package/src/infra/app/generator.d.ts +1 -1
- package/src/init/generator.d.ts +1 -1
- package/src/mcp-server/guide-pipeline.d.ts +2 -1
- package/src/mcp-server/guide-pipeline.js +6 -0
- package/src/mcp-server/guide-pipeline.js.map +1 -1
- package/src/mcp-server/mdx-ast.d.ts +7 -0
- package/src/mcp-server/mdx-ast.js +15 -0
- package/src/mcp-server/mdx-ast.js.map +1 -1
- package/src/mcp-server/schema-registry.d.ts +2 -2
- package/src/mcp-server/schema-registry.js +2 -2
- package/src/mcp-server/schema-registry.js.map +1 -1
- package/src/open-api/py-client/__snapshots__/generator.additional-properties.spec.ts.snap +34 -0
- package/src/open-api/py-client/__snapshots__/generator.arrays.spec.ts.snap +1750 -0
- package/src/open-api/py-client/__snapshots__/generator.complex-types.spec.ts.snap +82 -0
- package/src/open-api/py-client/__snapshots__/generator.composite-types.spec.ts.snap +447 -0
- package/src/open-api/py-client/__snapshots__/generator.duplicate-types.spec.ts.snap +404 -0
- package/src/open-api/py-client/__snapshots__/generator.errors.spec.ts.snap +430 -0
- package/src/open-api/py-client/__snapshots__/generator.fast-api.spec.ts.snap +447 -0
- package/src/open-api/py-client/__snapshots__/generator.petstore.spec.ts.snap +3488 -0
- package/src/open-api/py-client/__snapshots__/generator.primitive-types.spec.ts.snap +1444 -0
- package/src/open-api/py-client/__snapshots__/generator.request.spec.ts.snap +390 -0
- package/src/open-api/py-client/__snapshots__/generator.reserved-keywords.spec.ts.snap +364 -0
- package/src/open-api/py-client/__snapshots__/generator.response.spec.ts.snap +739 -0
- package/src/open-api/py-client/__snapshots__/generator.streaming.spec.ts.snap +384 -0
- package/src/open-api/py-client/__snapshots__/generator.tags.spec.ts.snap +414 -0
- package/src/open-api/py-client/files/client/__clientModuleName__.py.template +1076 -0
- package/src/open-api/py-client/files/shared/__init__.py.template +28 -0
- package/src/open-api/py-client/files/shared/errors.py.template +37 -0
- package/src/open-api/py-client/files/shared/types.py.template +319 -0
- package/src/open-api/py-client/generator.d.ts +53 -0
- package/src/open-api/py-client/generator.js +119 -0
- package/src/open-api/py-client/generator.js.map +1 -0
- package/src/open-api/py-client/schema.d.js +6 -0
- package/src/open-api/py-client/schema.d.js.map +1 -0
- package/src/open-api/py-client/schema.d.ts +12 -0
- package/src/open-api/py-client/schema.json +28 -0
- package/src/open-api/py-client/vessel-registry-spec.json +2716 -0
- package/src/open-api/ts-client/__snapshots__/generator.edge-cases.spec.ts.snap +274 -0
- package/src/open-api/ts-client/petstore-spec.d.ts +6 -0
- package/src/open-api/ts-client/petstore-spec.js +1275 -0
- package/src/open-api/ts-client/petstore-spec.js.map +1 -0
- package/src/open-api/ts-hooks/generator.spec.tsx +1 -1
- package/src/open-api/utils/codegen-data/languages.d.ts +68 -2
- package/src/open-api/utils/codegen-data/languages.js +433 -21
- package/src/open-api/utils/codegen-data/languages.js.map +1 -1
- package/src/open-api/utils/codegen-data/types.d.ts +187 -0
- package/src/open-api/utils/codegen-data/types.js +10 -1
- package/src/open-api/utils/codegen-data/types.js.map +1 -1
- package/src/open-api/utils/codegen-data.d.ts +40 -1
- package/src/open-api/utils/codegen-data.js +622 -17
- package/src/open-api/utils/codegen-data.js.map +1 -1
- package/src/open-api/utils/normalise.js +175 -41
- package/src/open-api/utils/normalise.js.map +1 -1
- package/src/open-api/utils/parser.js +1 -1
- package/src/open-api/utils/parser.js.map +1 -1
- package/src/preset/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/preset/generator.d.ts +1 -1
- package/src/py/agent/gateway-connection/generator.js +0 -3
- package/src/py/agent/gateway-connection/generator.js.map +1 -1
- package/src/py/agent/react-connection/generator.d.ts +1 -1
- package/src/py/agent/schema.json +2 -0
- package/src/py/fast-api/react/generator.d.ts +1 -1
- package/src/py/mcp-server/schema.json +1 -0
- package/src/sdk/open-api.d.ts +2 -0
- package/src/sdk/open-api.js +1 -0
- package/src/sdk/open-api.js.map +1 -1
- package/src/smithy/project/generator.d.ts +1 -1
- package/src/smithy/react-connection/generator.d.ts +1 -1
- package/src/terraform/project/generator.d.ts +1 -1
- package/src/trpc/react/generator.d.ts +1 -1
- package/src/ts/agent/a2a-connection/generator.d.ts +1 -1
- package/src/ts/agent/gateway-connection/generator.d.ts +1 -1
- package/src/ts/agent/gateway-connection/generator.js +0 -3
- package/src/ts/agent/gateway-connection/generator.js.map +1 -1
- package/src/ts/agent/mcp-connection/generator.d.ts +1 -1
- package/src/ts/agent/react-connection/generator.d.ts +1 -1
- package/src/ts/agent/schema.json +1 -0
- package/src/ts/api/schema.json +2 -0
- package/src/ts/astro-docs/generator.d.ts +1 -1
- package/src/ts/dcr-proxy/generator.d.ts +1 -1
- package/src/ts/dynamodb/generator.d.ts +1 -1
- package/src/ts/lambda-function/generator.d.ts +1 -1
- package/src/ts/lib/generator.d.ts +1 -1
- package/src/ts/mcp-server/schema.json +1 -0
- package/src/ts/nx-generator/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/ts/nx-generator/files/nx-plugin-for-aws/generator/generator.spec.ts.template +1 -1
- package/src/ts/nx-generator/generator.d.ts +1 -1
- package/src/ts/nx-migration/generator.d.ts +1 -1
- package/src/ts/nx-plugin/generator.d.ts +1 -1
- package/src/ts/rdb/generator.d.ts +1 -1
- package/src/ts/react-website/agui/generator.d.ts +1 -1
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +10 -10
- package/src/ts/react-website/app/schema.json +1 -0
- package/src/ts/website/app/schema.json +1 -0
- package/src/utils/metrics-assertions.d.ts +18 -0
- package/src/utils/metrics-assertions.js +42 -0
- package/src/utils/metrics-assertions.js.map +1 -0
- package/src/utils/test/python-dependencies.d.ts +8 -0
- package/src/utils/test/python-dependencies.js +14 -0
- package/src/utils/test/python-dependencies.js.map +1 -0
- package/src/utils/test/python-worker/worker.py +703 -0
- package/src/utils/test/warm-python-cache.d.ts +18 -0
- package/src/utils/test/warm-python-cache.js +46 -0
- package/src/utils/test/warm-python-cache.js.map +1 -0
- package/src/utils/versions.d.ts +10 -9
- package/src/utils/versions.js +9 -8
- package/src/utils/versions.js.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/nx-plugin/src/open-api/ts-client/petstore-spec.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Spec } from '../utils/types.js';\n\nexport const PET_STORE_SPEC: Spec = {\n openapi: '3.0.4',\n info: {\n title: 'Swagger Petstore - OpenAPI 3.0',\n description:\n \"This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about\\nSwagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\\nYou can now help us improve the API whether it's by making changes to the definition itself or to the code.\\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\\n\\nSome useful links:\\n- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)\\n- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)\",\n termsOfService: 'https://swagger.io/terms/',\n contact: { email: 'apiteam@swagger.io' },\n license: {\n name: 'Apache 2.0',\n url: 'https://www.apache.org/licenses/LICENSE-2.0.html',\n },\n version: '1.0.26',\n },\n externalDocs: {\n description: 'Find out more about Swagger',\n url: 'https://swagger.io',\n },\n servers: [{ url: '/api/v3' }],\n tags: [\n {\n name: 'pet',\n description: 'Everything about your Pets',\n externalDocs: { description: 'Find out more', url: 'https://swagger.io' },\n },\n {\n name: 'store',\n description: 'Access to Petstore orders',\n externalDocs: {\n description: 'Find out more about our store',\n url: 'https://swagger.io',\n },\n },\n { name: 'user', description: 'Operations about user' },\n ],\n paths: {\n '/pet': {\n put: {\n tags: ['pet'],\n summary: 'Update an existing pet.',\n description: 'Update an existing pet by Id.',\n operationId: 'updatePet',\n requestBody: {\n description: 'Update an existent pet in the store',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n 'application/xml': { schema: { $ref: '#/components/schemas/Pet' } },\n 'application/x-www-form-urlencoded': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n },\n required: true,\n },\n responses: {\n '200': {\n description: 'Successful operation',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n 'application/xml': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n },\n },\n '400': { description: 'Invalid ID supplied' },\n '404': { description: 'Pet not found' },\n '422': { description: 'Validation exception' },\n default: { description: 'Unexpected error' },\n },\n security: [{ petstore_auth: ['write:pets', 'read:pets'] }],\n },\n post: {\n tags: ['pet'],\n summary: 'Add a new pet to the store.',\n description: 'Add a new pet to the store.',\n operationId: 'addPet',\n requestBody: {\n description: 'Create a new pet in the store',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n 'application/xml': { schema: { $ref: '#/components/schemas/Pet' } },\n 'application/x-www-form-urlencoded': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n },\n required: true,\n },\n responses: {\n '200': {\n description: 'Successful operation',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n 'application/xml': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n },\n },\n '400': { description: 'Invalid input' },\n '422': { description: 'Validation exception' },\n default: { description: 'Unexpected error' },\n },\n security: [{ petstore_auth: ['write:pets', 'read:pets'] }],\n },\n },\n '/pet/findByStatus': {\n get: {\n tags: ['pet'],\n summary: 'Finds Pets by status.',\n description:\n 'Multiple status values can be provided with comma separated strings.',\n operationId: 'findPetsByStatus',\n parameters: [\n {\n name: 'status',\n in: 'query',\n description: 'Status values that need to be considered for filter',\n required: false,\n explode: true,\n schema: {\n type: 'string',\n default: 'available',\n enum: ['available', 'pending', 'sold'],\n },\n },\n ],\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application/json': {\n schema: {\n type: 'array',\n items: { $ref: '#/components/schemas/Pet' },\n },\n },\n 'application/xml': {\n schema: {\n type: 'array',\n items: { $ref: '#/components/schemas/Pet' },\n },\n },\n },\n },\n '400': { description: 'Invalid status value' },\n default: { description: 'Unexpected error' },\n },\n security: [{ petstore_auth: ['write:pets', 'read:pets'] }],\n },\n },\n '/pet/findByTags': {\n get: {\n tags: ['pet'],\n summary: 'Finds Pets by tags.',\n description:\n 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.',\n operationId: 'findPetsByTags',\n parameters: [\n {\n name: 'tags',\n in: 'query',\n description: 'Tags to filter by',\n required: false,\n explode: true,\n schema: { type: 'array', items: { type: 'string' } },\n },\n ],\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application/json': {\n schema: {\n type: 'array',\n items: { $ref: '#/components/schemas/Pet' },\n },\n },\n 'application/xml': {\n schema: {\n type: 'array',\n items: { $ref: '#/components/schemas/Pet' },\n },\n },\n },\n },\n '400': { description: 'Invalid tag value' },\n default: { description: 'Unexpected error' },\n },\n security: [{ petstore_auth: ['write:pets', 'read:pets'] }],\n },\n },\n '/pet/{petId}': {\n get: {\n tags: ['pet'],\n summary: 'Find pet by ID.',\n description: 'Returns a single pet.',\n operationId: 'getPetById',\n parameters: [\n {\n name: 'petId',\n in: 'path',\n description: 'ID of pet to return',\n required: true,\n schema: { type: 'integer', format: 'int64' },\n },\n ],\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n 'application/xml': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n },\n },\n '400': { description: 'Invalid ID supplied' },\n '404': { description: 'Pet not found' },\n default: { description: 'Unexpected error' },\n },\n security: [\n { api_key: [] },\n { petstore_auth: ['write:pets', 'read:pets'] },\n ],\n },\n post: {\n tags: ['pet'],\n summary: 'Updates a pet in the store with form data.',\n description: 'Updates a pet resource based on the form data.',\n operationId: 'updatePetWithForm',\n parameters: [\n {\n name: 'petId',\n in: 'path',\n description: 'ID of pet that needs to be updated',\n required: true,\n schema: { type: 'integer', format: 'int64' },\n },\n {\n name: 'name',\n in: 'query',\n description: 'Name of pet that needs to be updated',\n schema: { type: 'string' },\n },\n {\n name: 'status',\n in: 'query',\n description: 'Status of pet that needs to be updated',\n schema: { type: 'string' },\n },\n ],\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n 'application/xml': {\n schema: { $ref: '#/components/schemas/Pet' },\n },\n },\n },\n '400': { description: 'Invalid input' },\n default: { description: 'Unexpected error' },\n },\n security: [{ petstore_auth: ['write:pets', 'read:pets'] }],\n },\n delete: {\n tags: ['pet'],\n summary: 'Deletes a pet.',\n description: 'Delete a pet.',\n operationId: 'deletePet',\n parameters: [\n {\n name: 'api_key',\n in: 'header',\n description: '',\n required: false,\n schema: { type: 'string' },\n },\n {\n name: 'petId',\n in: 'path',\n description: 'Pet id to delete',\n required: true,\n schema: { type: 'integer', format: 'int64' },\n },\n ],\n responses: {\n '200': { description: 'Pet deleted' },\n '400': { description: 'Invalid pet value' },\n default: { description: 'Unexpected error' },\n },\n security: [{ petstore_auth: ['write:pets', 'read:pets'] }],\n },\n },\n '/pet/{petId}/uploadImage': {\n post: {\n tags: ['pet'],\n summary: 'Uploads an image.',\n description: 'Upload image of the pet.',\n operationId: 'uploadFile',\n parameters: [\n {\n name: 'petId',\n in: 'path',\n description: 'ID of pet to update',\n required: true,\n schema: { type: 'integer', format: 'int64' },\n },\n {\n name: 'additionalMetadata',\n in: 'query',\n description: 'Additional Metadata',\n required: false,\n schema: { type: 'string' },\n },\n ],\n requestBody: {\n content: {\n 'application/octet-stream': {\n schema: { type: 'string', format: 'binary' },\n },\n },\n },\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/ApiResponse' },\n },\n },\n },\n '400': { description: 'No file uploaded' },\n '404': { description: 'Pet not found' },\n default: { description: 'Unexpected error' },\n },\n security: [{ petstore_auth: ['write:pets', 'read:pets'] }],\n },\n },\n '/store/inventory': {\n get: {\n tags: ['store'],\n summary: 'Returns pet inventories by status.',\n description: 'Returns a map of status codes to quantities.',\n operationId: 'getInventory',\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application/json': {\n schema: {\n type: 'object',\n additionalProperties: { type: 'integer', format: 'int32' },\n },\n },\n },\n },\n default: { description: 'Unexpected error' },\n },\n security: [{ api_key: [] }],\n },\n },\n '/store/order': {\n post: {\n tags: ['store'],\n summary: 'Place an order for a pet.',\n description: 'Place a new order in the store.',\n operationId: 'placeOrder',\n requestBody: {\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/Order' },\n },\n 'application/xml': {\n schema: { $ref: '#/components/schemas/Order' },\n },\n 'application/x-www-form-urlencoded': {\n schema: { $ref: '#/components/schemas/Order' },\n },\n },\n },\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/Order' },\n },\n },\n },\n '400': { description: 'Invalid input' },\n '422': { description: 'Validation exception' },\n default: { description: 'Unexpected error' },\n },\n },\n },\n '/store/order/{orderId}': {\n get: {\n tags: ['store'],\n summary: 'Find purchase order by ID.',\n description:\n 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.',\n operationId: 'getOrderById',\n parameters: [\n {\n name: 'orderId',\n in: 'path',\n description: 'ID of order that needs to be fetched',\n required: true,\n schema: { type: 'integer', format: 'int64' },\n },\n ],\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/Order' },\n },\n 'application/xml': {\n schema: { $ref: '#/components/schemas/Order' },\n },\n },\n },\n '400': { description: 'Invalid ID supplied' },\n '404': { description: 'Order not found' },\n default: { description: 'Unexpected error' },\n },\n },\n delete: {\n tags: ['store'],\n summary: 'Delete purchase order by identifier.',\n description:\n 'For valid response try integer IDs with value < 1000. Anything above 1000 or non-integers will generate API errors.',\n operationId: 'deleteOrder',\n parameters: [\n {\n name: 'orderId',\n in: 'path',\n description: 'ID of the order that needs to be deleted',\n required: true,\n schema: { type: 'integer', format: 'int64' },\n },\n ],\n responses: {\n '200': { description: 'order deleted' },\n '400': { description: 'Invalid ID supplied' },\n '404': { description: 'Order not found' },\n default: { description: 'Unexpected error' },\n },\n },\n },\n '/user': {\n post: {\n tags: ['user'],\n summary: 'Create user.',\n description: 'This can only be done by the logged in user.',\n operationId: 'createUser',\n requestBody: {\n description: 'Created user object',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/User' },\n },\n 'application/xml': {\n schema: { $ref: '#/components/schemas/User' },\n },\n 'application/x-www-form-urlencoded': {\n schema: { $ref: '#/components/schemas/User' },\n },\n },\n },\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/User' },\n },\n 'application/xml': {\n schema: { $ref: '#/components/schemas/User' },\n },\n },\n },\n default: { description: 'Unexpected error' },\n },\n },\n },\n '/user/createWithList': {\n post: {\n tags: ['user'],\n summary: 'Creates list of users with given input array.',\n description: 'Creates list of users with given input array.',\n operationId: 'createUsersWithListInput',\n requestBody: {\n content: {\n 'application/json': {\n schema: {\n type: 'array',\n items: { $ref: '#/components/schemas/User' },\n },\n },\n },\n },\n responses: {\n '200': {\n description: 'Successful operation',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/User' },\n },\n 'application/xml': {\n schema: { $ref: '#/components/schemas/User' },\n },\n },\n },\n default: { description: 'Unexpected error' },\n },\n },\n },\n '/user/login': {\n get: {\n tags: ['user'],\n summary: 'Logs user into the system.',\n description: 'Log into the system.',\n operationId: 'loginUser',\n parameters: [\n {\n name: 'username',\n in: 'query',\n description: 'The user name for login',\n required: false,\n schema: { type: 'string' },\n },\n {\n name: 'password',\n in: 'query',\n description: 'The password for login in clear text',\n required: false,\n schema: { type: 'string' },\n },\n ],\n responses: {\n '200': {\n description: 'successful operation',\n headers: {\n 'X-Rate-Limit': {\n description: 'calls per hour allowed by the user',\n schema: { type: 'integer', format: 'int32' },\n },\n 'X-Expires-After': {\n description: 'date in UTC when token expires',\n schema: { type: 'string', format: 'date-time' },\n },\n },\n content: {\n 'application/xml': { schema: { type: 'string' } },\n 'application/json': { schema: { type: 'string' } },\n },\n },\n '400': { description: 'Invalid username/password supplied' },\n default: { description: 'Unexpected error' },\n },\n },\n },\n '/user/logout': {\n get: {\n tags: ['user'],\n summary: 'Logs out current logged in user session.',\n description: 'Log user out of the system.',\n operationId: 'logoutUser',\n parameters: [],\n responses: {\n '200': { description: 'successful operation' },\n default: { description: 'Unexpected error' },\n },\n },\n },\n '/user/{username}': {\n get: {\n tags: ['user'],\n summary: 'Get user by user name.',\n description: 'Get user detail based on username.',\n operationId: 'getUserByName',\n parameters: [\n {\n name: 'username',\n in: 'path',\n description:\n 'The name that needs to be fetched. Use user1 for testing',\n required: true,\n schema: { type: 'string' },\n },\n ],\n responses: {\n '200': {\n description: 'successful operation',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/User' },\n },\n 'application/xml': {\n schema: { $ref: '#/components/schemas/User' },\n },\n },\n },\n '400': { description: 'Invalid username supplied' },\n '404': { description: 'User not found' },\n default: { description: 'Unexpected error' },\n },\n },\n put: {\n tags: ['user'],\n summary: 'Update user resource.',\n description: 'This can only be done by the logged in user.',\n operationId: 'updateUser',\n parameters: [\n {\n name: 'username',\n in: 'path',\n description: 'name that need to be deleted',\n required: true,\n schema: { type: 'string' },\n },\n ],\n requestBody: {\n description: 'Update an existent user in the store',\n content: {\n 'application/json': {\n schema: { $ref: '#/components/schemas/User' },\n },\n 'application/xml': {\n schema: { $ref: '#/components/schemas/User' },\n },\n 'application/x-www-form-urlencoded': {\n schema: { $ref: '#/components/schemas/User' },\n },\n },\n },\n responses: {\n '200': { description: 'successful operation' },\n '400': { description: 'bad request' },\n '404': { description: 'user not found' },\n default: { description: 'Unexpected error' },\n },\n },\n delete: {\n tags: ['user'],\n summary: 'Delete user resource.',\n description: 'This can only be done by the logged in user.',\n operationId: 'deleteUser',\n parameters: [\n {\n name: 'username',\n in: 'path',\n description: 'The name that needs to be deleted',\n required: true,\n schema: { type: 'string' },\n },\n ],\n responses: {\n '200': { description: 'User deleted' },\n '400': { description: 'Invalid username supplied' },\n '404': { description: 'User not found' },\n default: { description: 'Unexpected error' },\n },\n },\n },\n },\n components: {\n schemas: {\n Order: {\n type: 'object',\n properties: {\n id: { type: 'integer', format: 'int64', example: 10 },\n petId: { type: 'integer', format: 'int64', example: 198772 },\n quantity: { type: 'integer', format: 'int32', example: 7 },\n shipDate: { type: 'string', format: 'date-time' },\n status: {\n type: 'string',\n description: 'Order Status',\n example: 'approved',\n enum: ['placed', 'approved', 'delivered'],\n },\n complete: { type: 'boolean' },\n },\n xml: { name: 'order' },\n },\n Category: {\n type: 'object',\n properties: {\n id: { type: 'integer', format: 'int64', example: 1 },\n name: { type: 'string', example: 'Dogs' },\n },\n xml: { name: 'category' },\n },\n User: {\n type: 'object',\n properties: {\n id: { type: 'integer', format: 'int64', example: 10 },\n username: { type: 'string', example: 'theUser' },\n firstName: { type: 'string', example: 'John' },\n lastName: { type: 'string', example: 'James' },\n email: { type: 'string', example: 'john@email.com' },\n password: { type: 'string', example: '12345' },\n phone: { type: 'string', example: '12345' },\n userStatus: {\n type: 'integer',\n description: 'User Status',\n format: 'int32',\n example: 1,\n },\n },\n xml: { name: 'user' },\n },\n Tag: {\n type: 'object',\n properties: {\n id: { type: 'integer', format: 'int64' },\n name: { type: 'string' },\n },\n xml: { name: 'tag' },\n },\n Pet: {\n required: ['name', 'photoUrls'],\n type: 'object',\n properties: {\n id: { type: 'integer', format: 'int64', example: 10 },\n name: { type: 'string', example: 'doggie' },\n category: { $ref: '#/components/schemas/Category' },\n photoUrls: {\n type: 'array',\n xml: { wrapped: true },\n items: { type: 'string', xml: { name: 'photoUrl' } },\n },\n tags: {\n type: 'array',\n xml: { wrapped: true },\n items: { $ref: '#/components/schemas/Tag' },\n },\n status: {\n type: 'string',\n description: 'pet status in the store',\n enum: ['available', 'pending', 'sold'],\n },\n },\n xml: { name: 'pet' },\n },\n ApiResponse: {\n type: 'object',\n properties: {\n code: { type: 'integer', format: 'int32' },\n type: { type: 'string' },\n message: { type: 'string' },\n },\n xml: { name: '##default' },\n },\n },\n requestBodies: {\n Pet: {\n description: 'Pet object that needs to be added to the store',\n content: {\n 'application/json': { schema: { $ref: '#/components/schemas/Pet' } },\n 'application/xml': { schema: { $ref: '#/components/schemas/Pet' } },\n },\n },\n UserArray: {\n description: 'List of user object',\n content: {\n 'application/json': {\n schema: {\n type: 'array',\n items: { $ref: '#/components/schemas/User' },\n },\n },\n },\n },\n },\n securitySchemes: {\n petstore_auth: {\n type: 'oauth2',\n flows: {\n implicit: {\n authorizationUrl: 'https://petstore3.swagger.io/oauth/authorize',\n scopes: {\n 'write:pets': 'modify pets in your account',\n 'read:pets': 'read your pets',\n },\n },\n },\n },\n api_key: { type: 'apiKey', name: 'api_key', in: 'header' },\n },\n },\n};\n"],"names":["PET_STORE_SPEC","openapi","info","title","description","termsOfService","contact","email","license","name","url","version","externalDocs","servers","tags","paths","put","summary","operationId","requestBody","content","schema","$ref","required","responses","default","security","petstore_auth","post","get","parameters","in","explode","type","enum","items","format","api_key","delete","additionalProperties","headers","components","schemas","Order","properties","id","example","petId","quantity","shipDate","status","complete","xml","Category","User","username","firstName","lastName","password","phone","userStatus","Tag","Pet","category","photoUrls","wrapped","ApiResponse","code","message","requestBodies","UserArray","securitySchemes","flows","implicit","authorizationUrl","scopes"],"mappings":"AAAA;;;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BACJmB,MAAM;wBACNmB,KAAK;4BAAEa,SAAS;wBAAK;wBACrB9B,OAAO;4BAAEb,MAAM;wBAA2B;oBAC5C;oBACA4B,QAAQ;wBACNjB,MAAM;wBACN7B,aAAa;wBACb8B,MAAM;4BAAC;4BAAa;4BAAW;yBAAO;oBACxC;gBACF;gBACAkB,KAAK;oBAAE3C,MAAM;gBAAM;YACrB;YACAyD,aAAa;gBACXjC,MAAM;gBACNW,YAAY;oBACVuB,MAAM;wBAAElC,MAAM;wBAAWG,QAAQ;oBAAQ;oBACzCH,MAAM;wBAAEA,MAAM;oBAAS;oBACvBmC,SAAS;wBAAEnC,MAAM;oBAAS;gBAC5B;gBACAmB,KAAK;oBAAE3C,MAAM;gBAAY;YAC3B;QACF;QACA4D,eAAe;YACbP,KAAK;gBACH1D,aAAa;gBACbgB,SAAS;oBACP,oBAAoB;wBAAEC,QAAQ;4BAAEC,MAAM;wBAA2B;oBAAE;oBACnE,mBAAmB;wBAAED,QAAQ;4BAAEC,MAAM;wBAA2B;oBAAE;gBACpE;YACF;YACAgD,WAAW;gBACTlE,aAAa;gBACbgB,SAAS;oBACP,oBAAoB;wBAClBC,QAAQ;4BACNY,MAAM;4BACNE,OAAO;gCAAEb,MAAM;4BAA4B;wBAC7C;oBACF;gBACF;YACF;QACF;QACAiD,iBAAiB;YACf5C,eAAe;gBACbM,MAAM;gBACNuC,OAAO;oBACLC,UAAU;wBACRC,kBAAkB;wBAClBC,QAAQ;4BACN,cAAc;4BACd,aAAa;wBACf;oBACF;gBACF;YACF;YACAtC,SAAS;gBAAEJ,MAAM;gBAAUxB,MAAM;gBAAWsB,IAAI;YAAS;QAC3D;IACF;AACF,EAAE"}
|
|
@@ -19,7 +19,7 @@ import type { Mock } from 'vitest';
|
|
|
19
19
|
import { importTypeScriptModule } from '../../utils/js.js';
|
|
20
20
|
import { TypeScriptVerifier } from '../../utils/test/ts.spec.js';
|
|
21
21
|
import { createTreeUsingTsSolutionSetup } from '../../utils/test.js';
|
|
22
|
-
import { PET_STORE_SPEC } from '../ts-client/
|
|
22
|
+
import { PET_STORE_SPEC } from '../ts-client/petstore-spec.js';
|
|
23
23
|
import type { Spec } from '../utils/types.js';
|
|
24
24
|
import { openApiTsHooksGenerator } from './generator.js';
|
|
25
25
|
|
|
@@ -2,9 +2,75 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { type Model } from './types.js';
|
|
5
|
+
import { type Model, type PythonType } from './types.js';
|
|
6
6
|
export declare const toTypeScriptType: (property: Model) => string;
|
|
7
7
|
export declare const toTypeScriptName: (name: string) => string;
|
|
8
8
|
export declare const toTypeScriptModelName: (name: string) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Every class-cased Python builtin, checked against `dir(builtins)` by a test.
|
|
11
|
+
*
|
|
12
|
+
* A schema of the same name is emitted as a class that shadows the builtin only
|
|
13
|
+
* from its own definition onwards, so an annotation rendered above it resolves to
|
|
14
|
+
* the builtin — a `types.py` that does not import, and whether it happens depends
|
|
15
|
+
* on where the schema sorts.
|
|
16
|
+
*/
|
|
17
|
+
export declare const PYTHON_CLASS_CASED_BUILTINS: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Return the Python class name for a model. Starts from the TypeScript
|
|
20
|
+
* escape (which already handles TS-reserved names like `Error` → `_Error`)
|
|
21
|
+
* and additionally escapes names that would shadow imports in the generated
|
|
22
|
+
* Python files.
|
|
23
|
+
*/
|
|
24
|
+
export declare const toPythonClassName: (name: string) => string;
|
|
25
|
+
/**
|
|
26
|
+
* Render a value as a Python literal expression: a quoted string with anything
|
|
27
|
+
* that would break out of the quotes escaped, `None` for null, and the bare
|
|
28
|
+
* value for numbers.
|
|
29
|
+
*/
|
|
30
|
+
export declare const toPythonLiteral: (value: unknown) => string;
|
|
31
|
+
/**
|
|
32
|
+
* The Python type of a property, as a tree.
|
|
33
|
+
*
|
|
34
|
+
* This is the single place a model's Python type is derived. Consumers that
|
|
35
|
+
* need to know what a type is — a collection, a class reference, a literal —
|
|
36
|
+
* inspect the tree rather than the rendered string, and render it with
|
|
37
|
+
* {@link renderPythonType} when they need source text.
|
|
38
|
+
*/
|
|
39
|
+
export declare const toPythonTypeTree: (property: Model) => PythonType;
|
|
40
|
+
/** How a reference to a generated class is spelled where it is rendered. */
|
|
41
|
+
export interface RenderPythonTypeOptions {
|
|
42
|
+
/**
|
|
43
|
+
* Namespace prefix for a class reference, e.g. `"types."` from a client
|
|
44
|
+
* module that imports the types module wholesale.
|
|
45
|
+
*/
|
|
46
|
+
readonly prefix?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Wrap a class reference in quotes, for use inside a class body before the
|
|
49
|
+
* referenced class is defined. pydantic resolves these lazily.
|
|
50
|
+
*/
|
|
51
|
+
readonly forwardRef?: boolean;
|
|
52
|
+
}
|
|
53
|
+
/** Render a structured Python type as source text. */
|
|
54
|
+
export declare const renderPythonType: (type: PythonType, options?: RenderPythonTypeOptions) => string;
|
|
55
|
+
/**
|
|
56
|
+
* Return the idiomatic Python type for a given property.
|
|
57
|
+
*
|
|
58
|
+
* Uses PEP-585 lower-case generics (`list[...]`, `dict[str, ...]`), fully-
|
|
59
|
+
* qualified stdlib types (`datetime.date`, `datetime.datetime`), `bytes` for
|
|
60
|
+
* binary payloads, and `Literal[...]` for enums. Model references are
|
|
61
|
+
* returned as bare class names — callers that emit the type inside a class
|
|
62
|
+
* body (where the class isn't yet defined) should use `toPythonAnnotation`
|
|
63
|
+
* instead to get forward-ref quoting.
|
|
64
|
+
*/
|
|
9
65
|
export declare const toPythonType: (property: Model) => string;
|
|
10
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Render a type with every class reference prefixed with the given namespace,
|
|
68
|
+
* so a client module can reach the types module through a single import.
|
|
69
|
+
*/
|
|
70
|
+
export declare const qualifyPythonType: (type: PythonType | undefined, prefix: string) => string;
|
|
71
|
+
/**
|
|
72
|
+
* Same as `toPythonType`, but wraps class references in forward-ref quotes so
|
|
73
|
+
* they can be used inside a class body before the class is defined.
|
|
74
|
+
*/
|
|
75
|
+
export declare const toPythonAnnotation: (property: Model) => string;
|
|
76
|
+
export declare const toPythonName: (namedEntity: "model" | "property" | "operation" | "argument", name: string) => string;
|