Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
`@nahkies/openapi-code-generator` is a CLI tool that aims to generate high quality typescript client SDK's,
and API server scaffolding (routing, validation, serialization) from api specifications.

Currently, [OpenAPI 3.0](https://swagger.io/specification/v3), [OpenAPI 3.1](https://swagger.io/specification/),
Currently, [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.4.html), [OpenAPI 3.1.x](https://spec.openapis.org/oas/v3.1.1.html),
and [TypeSpec](https://typespec.io/) are supported as input specifications.

With typescript templates for [koa](https://openapi-code-generator.nahkies.co.nz/guides/server-templates/typescript-koa), [express](https://openapi-code-generator.nahkies.co.nz/guides/server-templates/typescript-express), [fetch](https://openapi-code-generator.nahkies.co.nz/guides/client-templates/typescript-fetch), [axios](https://openapi-code-generator.nahkies.co.nz/guides/client-templates/typescript-axios), and [angular](https://openapi-code-generator.nahkies.co.nz/guides/client-templates/typescript-angular) currently available.
Expand Down
3 changes: 2 additions & 1 deletion packages/documentation/src/app/overview/about/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {Callout} from "nextra/components"
`@nahkies/openapi-code-generator` is a CLI tool that aims to generate high quality typescript client SDK's,
and API server scaffolding (routing, validation, serialization) from OpenAPI 3 specifications.

Currently, [OpenAPI 3.0](https://swagger.io/specification/v3), [OpenAPI 3.1](https://swagger.io/specification/), and [TypeSpec](https://typespec.io/) are supported an input specifications.
Currently, [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.4.html), [OpenAPI 3.1.x](https://spec.openapis.org/oas/v3.1.1.html),
and [TypeSpec](https://typespec.io/) are supported an input specifications.

This gives you amazing auto-complete, and compile-time safety. Typescript's expressive type system is used to
make the generated clients feel idiomatic, and as close to handwritten as possible.
Expand Down
41 changes: 21 additions & 20 deletions packages/documentation/src/app/overview/compatibility/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ an understanding of what does / doesn't work.
detailing your use-case, and we can work together to get support added / extended.

We will also accept pull requests where implemented functionality follows the [OpenAPI
specification](https://swagger.io/specification/),
specification](https://spec.openapis.org/),
and the output code is of a high quality in terms of developer experience and robustness. See
[CONTRIBUTING.md](https://github.com/mnahkies/openapi-code-generator/blob/main/CONTRIBUTING.md)
to get started
Expand All @@ -26,11 +26,12 @@ an understanding of what does / doesn't work.
Most common functionality used by JSON based APIs should work.

- Great support for `paths` using `application/json` request / response bodies
- Decent support for `paths` using `application/x-www-form-urlencoded` request bodies
- Comprehensive support for most `schema` properties, including json validation stuff like `minLength`,
but only for `json` content types. Notable exceptions:
- `readonly` is currently implemented incorrectly
- `discriminator` is ignored, but `union` / `intersection` types will be generated based on `anyOf` / `allOf` so
this isn't often an issue in practice
this isn't an issue in practice
- No support for security schemes, you'll need to fudge these as header parameters, or implement out-of-band
for the specification for now.
- No support for `webhooks` / `callbacks` yet
Expand Down Expand Up @@ -182,10 +183,10 @@ everything should just work as you'd guess/expect.
| content | 🚫 | Not yet supported |

### Request Body Object
Well-supported for `application/json` (including some variations like `application/scim+json`) and `text/plain` content types.
Well-supported for `application/json` (including some variations like `application/scim+json`), `text/plain`,
and `application/x-www-form-urlencoded` content types,

Support for `multipart/form-data`, `application/x-www-form-urlencoded` and `application/octocat-stream`, etc
planned to come soon.
Support for `multipart/form-data`, `application/octocat-stream`, etc. planned to come soon.

| Attribute | Supported | Notes |
|:------------------------------|:---------:|---------------------------------------------------------------:|
Expand All @@ -195,12 +196,12 @@ planned to come soon.

### Media Type Object

| Attribute | Supported | Notes |
|:-------------------------|:---------:|:------------------|
| [schema](#schema-object) | ✅ | |
| example | __N/A__ | Ignored |
| examples | __N/A__ | Ignored |
| encoding | 🚫 | Not yet supported |
| Attribute | Supported | Notes |
|:-------------------------|:---------:|:-----------------------------------------------------------------|
| [schema](#schema-object) | ✅ | |
| example | __N/A__ | Ignored |
| examples | __N/A__ | Ignored |
| encoding | 🚧 | Supported for `application/x-www-form-urlencoded` request bodies |

### Responses Object
Well supported.
Expand Down Expand Up @@ -281,18 +282,18 @@ as a breaking change prior to v1.
| deprecated | 🚫 | Not yet supported |
| xml | 🚫 | Not yet supported |

### Encoding Object
| Attribute | Supported | Notes |
|:--------------|:---------:|:-------------------------------------------------------------------|
| contentType | 🚫 | Not yet supported |
| headers | 🚫 | Not yet supported |
| style | ✅/🚧 | Only applies to `application/x-www-form-urlencoded` request bodies |
| explode | ✅/🚧 | Only applies to `application/x-www-form-urlencoded` request bodies |
| allowReserved | 🚫 | Not yet supported |

## Completely unsupported things
The following objects are completely unsupported at this stage.

### Encoding Object
| Attribute | Supported | Notes |
|:--------------|:---------:|:------------------|
| contentType | 🚫 | Not yet supported |
| headers | 🚫 | Not yet supported |
| style | 🚫 | Not yet supported |
| explode | 🚫 | Not yet supported |
| allowReserved | 🚫 | Not yet supported |

### Callback Object
The callback object is completely unsupported.

Expand Down
3 changes: 2 additions & 1 deletion packages/documentation/src/app/overview/roadmap/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ These are broadly speaking the known blockers to doing the first v1 release.
<Steps>
### Support multipart/form-data (file uploads)

Currently only `application/json` request bodies are supported properly.
Currently only `application/json`, `text/plain`, and `application/x-www-form-urlencoded`
request bodies are supported properly.

This is particularly problematic when wanting to upload files, such as images
or videos.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ As environment variable `OPENAPI_INPUT`
Path to the input specification to generate from. Either a local path, or a url may be provided, though not all
specifications will build correctly from a url.

By default, this must be a [OpenAPI 3.0](https://swagger.io/specification/v3) or [OpenAPI 3.1](https://swagger.io/specification/)
By default, this must be a [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.4.html) or [OpenAPI 3.1.x](https://spec.openapis.org/oas/v3.1.1.html)
specification, in either `YAML` or `JSON` format.

When used in conjunction with `--input-type typespec` then a [TypeSpec](https://typespec.io/) specification can be
Expand Down
6 changes: 3 additions & 3 deletions packages/openapi-code-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
`@nahkies/openapi-code-generator` is a CLI tool that aims to generate high quality typescript client SDK's,
and API server scaffolding (routing, validation, serialization) from OpenAPI 3 specifications.

Currently, [OpenAPI 3.0](https://swagger.io/specification/v3), [OpenAPI 3.1](https://swagger.io/specification/),
and [TypeSpec](https://typespec.io/) are supported an input specifications.
Currently, [OpenAPI 3.0.x](https://spec.openapis.org/oas/v3.0.4.html), [OpenAPI 3.1.x](https://spec.openapis.org/oas/v3.1.1.html),
and [TypeSpec](https://typespec.io/) are supported as input specifications.

<!-- toc -->

Expand All @@ -34,7 +34,7 @@ for handwritten release notes, or [CHANGELOG.md](https://github.com/mnahkies/ope
This project is still in beta, and breaking changes are still likely to be made before moving to v1.
However, these are considered thoughtfully and we aim to minimise disruption.

In general what is implemented works well, but there are still parts of the OpenAPI specification that
In general, what is implemented works well, but there are still parts of the OpenAPI specification that
haven't been implemented, so YMMV.

## More information / contributing
Expand Down
1 change: 1 addition & 0 deletions packages/openapi-code-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"openapi",
"openapi3",
"typespec",
"swagger",
"typescript",
"zod",
"api",
Expand Down