Skip to main content

Type Safe API

Define your APIs using Smithy or OpenAPI v3, and leverage the power of generated client and server types, infrastructure, documentation, and automatic input validation!

This package vends a projen project type which allows you to define an API using either Smithy or OpenAPI v3, and a construct which manages deploying this API in API Gateway, given an integration (eg a lambda) for every operation.

The project will generate "runtime" projects from your API definition in your desired languages, which can be utilised both client side for interacting with your API, or server side for implementing your API. The project also generates a type-safe CDK construct which ensures an integration is provided for every API operation.

Code is generated at build time, so when you change your API model, just rebuild and you'll see your changes reflected in the generated code.

Project Structure

The TypeSafeApiProject projen project will create the following directory structure within its outdir:

|_ model/
    |_ src/
        |_ main/
            |_ smithy - your API definition if you chose ModelLanguage.SMITHY
            |_ openapi - your API definition if you chose ModelLanguage.OPENAPI
|_ generated/
    |_ runtime/ - generated types, client, and server code in the languages you specified
        |_ typescript
        |_ python
        |_ java
    |_ infrastructure/ - generated infrastructure (you'll find only one directory in here based on your chosen infrastructure language)
        |_ typescript
        |_ python
        |_ java
    |_ documentation/ - generated documentation in the formats you specified
        |_ html2
        |_ html_redoc
        |_ plantuml
        |_ markdown
    |_ library/ - generated libraries if specified
        |_ typescript-react-query-hooks

Getting Started

Please see the Getting Started Guide for how to get started!

Developer Guides

For more information about Type Safe API, take a look at the developer guides:

Walkthroughs

For detailed end-to-end examples, take a look at the walkthroughs:

You can also check out the Frequently Asked Questions.

Metadata

Release files for aws-prototyping-sdk.type-safe-api 0.19.68

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-prototyping-sdk.type-safe-api 0.19.68
File Size Uploaded
aws_prototyping_sdk.type_safe_api-0.19.68.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-prototyping-sdk.type-safe-api 0.19.68
File Interpreter ABI Platform
aws_prototyping_sdk.type_safe_api-0.19.68-py3-none-any.whl Python 3 none any Details

Total release size: 3.0 MB

Release files / aws_prototyping_sdk.type_safe_api-0.19.68.tar.gz

Download URL aws_prototyping_sdk.type_safe_api-0.19.68.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
1bb960a961d5057f3bf702e8bb23780a445f942edacfe90df10657e8ab53757d
BLAKE2b-256 checksum
How to use checksums
575a2ff4e211e8e432dd6c8b0ac4b3ebff32402ff52ff6520b8d2e322c1c9c8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / aws_prototyping_sdk.type_safe_api-0.19.68-py3-none-any.whl

Download URL aws_prototyping_sdk.type_safe_api-0.19.68-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
07d8b6fbf2f0123087c23e2fe5b96d8bb624e5cb981d9e5cb414c250be7ebf2c
BLAKE2b-256 checksum
How to use checksums
ecaea468235102932ac6ccecea67c4b5db0e68bb3becb2b82429eb336a28c687
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.19.68 This release

2 release files

0.19.9

2 release files

0.19.8

2 release files

0.19.7

2 release files

0.19.6

2 release files

0.19.5

2 release files

0.18.9

2 release files

0.18.8

2 release files

0.18.7

2 release files

0.18.6

2 release files

0.17.4

2 release files

0.17.3

2 release files

0.17.2

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.15.5

2 release files

0.15.4

2 release files

0.15.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page