From 86f6835886eea58f1def2afc8f3237b8150c183a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2024 12:15:47 +0000 Subject: [PATCH] Updates --- 404.html | 4 ++-- .../_buildManifest.js | 0 .../_ssgManifest.js | 0 getting-started/quick-start.html | 4 ++-- getting-started/tips-for-writing-specifications.html | 4 ++-- guides/client-templates/typescript-angular.html | 4 ++-- guides/client-templates/typescript-axios.html | 4 ++-- guides/client-templates/typescript-fetch.html | 4 ++-- guides/concepts/authenticated-input-specifications.html | 4 ++-- guides/concepts/extract-inline-schemas.html | 4 ++-- guides/concepts/servers-object-handling.html | 4 ++-- guides/server-templates/typescript-koa.html | 4 ++-- guides/use-with-react-query.html | 4 ++-- index.html | 2 +- overview/about.html | 4 ++-- overview/compatibility.html | 4 ++-- overview/roadmap.html | 4 ++-- overview/schema-first-design.html | 4 ++-- reference/cli-options.html | 4 ++-- reference/release-notes.html | 4 ++-- 20 files changed, 35 insertions(+), 35 deletions(-) rename _next/static/{EqqUuchnr05QZoazuMkUF => Tngb85HXumjXDVshrbhUb}/_buildManifest.js (100%) rename _next/static/{EqqUuchnr05QZoazuMkUF => Tngb85HXumjXDVshrbhUb}/_ssgManifest.js (100%) diff --git a/404.html b/404.html index 3284df2e..9b8028df 100644 --- a/404.html +++ b/404.html @@ -1,3 +1,3 @@ -Page not found – OpenAPI Code Generator
404

Page not found

+Page not found – OpenAPI Code Generator
404

Page not found

Sorry this page doesn’t exist 😞

-

Please use the navigation on your left, or the search box at the top to get back on track.

\ No newline at end of file +

Please use the navigation on your left, or the search box at the top to get back on track.

\ No newline at end of file diff --git a/_next/static/EqqUuchnr05QZoazuMkUF/_buildManifest.js b/_next/static/Tngb85HXumjXDVshrbhUb/_buildManifest.js similarity index 100% rename from _next/static/EqqUuchnr05QZoazuMkUF/_buildManifest.js rename to _next/static/Tngb85HXumjXDVshrbhUb/_buildManifest.js diff --git a/_next/static/EqqUuchnr05QZoazuMkUF/_ssgManifest.js b/_next/static/Tngb85HXumjXDVshrbhUb/_ssgManifest.js similarity index 100% rename from _next/static/EqqUuchnr05QZoazuMkUF/_ssgManifest.js rename to _next/static/Tngb85HXumjXDVshrbhUb/_ssgManifest.js diff --git a/getting-started/quick-start.html b/getting-started/quick-start.html index 76c3255e..bfbb70a8 100644 --- a/getting-started/quick-start.html +++ b/getting-started/quick-start.html @@ -1,4 +1,4 @@ -Quick Start – OpenAPI Code Generator
Getting StartedQuick Start

Quick Start

+Quick Start – OpenAPI Code Generator
Getting StartedQuick Start

Quick Start

Install the latest NodeJS LTS release, though any recent version of NodeJS will likely work.

You’ll also need either an OpenAPI v3 / v3.1, or TypeSpec API specification to generate from. You can provide OpenAPI specifications as YAML or JSON, local files or remote urls - we’ll load them all! 🚀

@@ -83,4 +83,4 @@

--input-type=typespec \ --output ./src/generated/clients/some-service \ --template typescript-fetch

-

You can see examples of code generated from typespec specifications here

\ No newline at end of file +

You can see examples of code generated from typespec specifications here

RoadmapTips for Writing Specifications
\ No newline at end of file diff --git a/getting-started/tips-for-writing-specifications.html b/getting-started/tips-for-writing-specifications.html index d75e7f70..45b03943 100644 --- a/getting-started/tips-for-writing-specifications.html +++ b/getting-started/tips-for-writing-specifications.html @@ -1,4 +1,4 @@ -Tips for writing a good specification – OpenAPI Code Generator
Getting StartedTips for Writing Specifications

Tips for writing a good specification

+Tips for writing a good specification – OpenAPI Code Generator
Getting StartedTips for Writing Specifications

Tips for writing a good specification

Garbage in, garbage out applies especially to code generation tools. In short the more detailed, and accurate the specification, the better the code and documentation you’ll get from it.

This page outlines some tips to enhance the quality of the generated code, and make your specification easier to maintain.

@@ -101,4 +101,4 @@

title: Awesome Service

Will output a class AwesomeServiceClient

If you can’t modify the title, you can use --override-specification-title "Some Other Title" -to workaround.

\ No newline at end of file +to workaround.

Quick StartAuthenticated Input Specifications
\ No newline at end of file diff --git a/guides/client-templates/typescript-angular.html b/guides/client-templates/typescript-angular.html index 6668623b..06140f56 100644 --- a/guides/client-templates/typescript-angular.html +++ b/guides/client-templates/typescript-angular.html @@ -1,4 +1,4 @@ -Using the typescript-angular template – OpenAPI Code Generator
GuidesClient TemplatesTypeScript Angular

Using the typescript-angular template

+Using the typescript-angular template – OpenAPI Code Generator
GuidesClient TemplatesTypeScript Angular

Using the typescript-angular template

⚠️

this is the least battle tested of the templates and most likely to have critical bugs

The typescript-angular template outputs a client SDK based on the Angular HttpClient that gives the following:

    @@ -85,4 +85,4 @@

    } }) } -}

\ No newline at end of file +}
Servers Object HandlingTypeScript Axios
\ No newline at end of file diff --git a/guides/client-templates/typescript-axios.html b/guides/client-templates/typescript-axios.html index 6acf18c6..8da607c8 100644 --- a/guides/client-templates/typescript-axios.html +++ b/guides/client-templates/typescript-axios.html @@ -1,4 +1,4 @@ -Using the typescript-axios template – OpenAPI Code Generator
GuidesClient TemplatesTypeScript Axios

Using the typescript-axios template

+Using the typescript-axios template – OpenAPI Code Generator
GuidesClient TemplatesTypeScript Axios

Using the typescript-axios template

The typescript-axios template outputs a client SDK based on the axios that gives the following:

  • Typed methods to call each endpoint
  • @@ -87,4 +87,4 @@

    }) // data will be typed correctly -console.log(`id is: ${res.data.id}`)

\ No newline at end of file +console.log(`id is: ${res.data.id}`)
TypeScript AngularTypeScript Fetch
\ No newline at end of file diff --git a/guides/client-templates/typescript-fetch.html b/guides/client-templates/typescript-fetch.html index d5cc7ab1..a59e3326 100644 --- a/guides/client-templates/typescript-fetch.html +++ b/guides/client-templates/typescript-fetch.html @@ -1,4 +1,4 @@ -Using the typescript-fetch template – OpenAPI Code Generator
GuidesClient TemplatesTypeScript Fetch

Using the typescript-fetch template

+Using the typescript-fetch template – OpenAPI Code Generator
GuidesClient TemplatesTypeScript Fetch

Using the typescript-fetch template

The typescript-fetch template outputs a client SDK based on the fetch api that gives the following:

  • Typed methods to call each endpoint
  • @@ -92,4 +92,4 @@

    // body will be typed correctly const body = await res.json() -console.log(`id is: ${body.id}`)

\ No newline at end of file +console.log(`id is: ${body.id}`)
TypeScript AxiosTypeScript Koa
\ No newline at end of file diff --git a/guides/concepts/authenticated-input-specifications.html b/guides/concepts/authenticated-input-specifications.html index 31e2edd9..00a11a95 100644 --- a/guides/concepts/authenticated-input-specifications.html +++ b/guides/concepts/authenticated-input-specifications.html @@ -1,4 +1,4 @@ -Authenticated input specifications – OpenAPI Code Generator
GuidesConceptsAuthenticated Input Specifications

Authenticated input specifications

+Authenticated input specifications – OpenAPI Code Generator
GuidesConceptsAuthenticated Input Specifications

Authenticated input specifications

Sometimes you want to generate using a URL as the input, but the URL requires some kind of authentication header to be passed.

A good example is Google cloud platforms IAP proxy, @@ -55,4 +55,4 @@

Why JSON you ask? Simply put it has very well-defined semantics, and is easy to parse without fear of jumbling the pieces together.

I started by trying to come up with a more ergonomic format, and then felt like I was re-inventing JSON -when it came to dealing with all the edge cases correctly.

\ No newline at end of file +when it came to dealing with all the edge cases correctly.

\ No newline at end of file diff --git a/guides/concepts/extract-inline-schemas.html b/guides/concepts/extract-inline-schemas.html index dee8e5a0..09904039 100644 --- a/guides/concepts/extract-inline-schemas.html +++ b/guides/concepts/extract-inline-schemas.html @@ -1,4 +1,4 @@ -Extract inline schemas – OpenAPI Code Generator
GuidesConceptsExtract Inline Schemas

Extract inline schemas

+Extract inline schemas – OpenAPI Code Generator
GuidesConceptsExtract Inline Schemas

Extract inline schemas

We have experimental support for “extracting inline schemas” behind the --extract-inline-schemas / OPENAPI_EXTRACT_INLINE_SCHEMAS=true configuration flag.

What does this mean?

@@ -184,4 +184,4 @@

})

This can be a handy trick to make the code generated from schemas you don’t own/control easier to work with. In general you should prefer to improve the specifications to be more suitable for code generation, which generally also improves -the result of documentation tools like Redoc

\ No newline at end of file +the result of documentation tools like Redoc

Authenticated Input SpecificationsServers Object Handling
\ No newline at end of file diff --git a/guides/concepts/servers-object-handling.html b/guides/concepts/servers-object-handling.html index 077b71d1..2fe5308f 100644 --- a/guides/concepts/servers-object-handling.html +++ b/guides/concepts/servers-object-handling.html @@ -1,4 +1,4 @@ -Guide to servers object handling – OpenAPI Code Generator
GuidesConceptsServers Object Handling

Guide to servers object handling

+Guide to servers object handling – OpenAPI Code Generator
GuidesConceptsServers Object Handling

Guide to servers object handling

OpenAPI 3 has a servers property that can be used to define the base url for the whole document, or specific operations. This guide aims to explain how this is processed.

You can find the specifications definition of the servers object here

@@ -74,4 +74,4 @@

--enable-typed-base-paths=false

When disabled basePath: string parameters will still be added to operations that have a servers override, but no code based on the url or variables will be generated.

-

See also CLI reference

\ No newline at end of file +

See also CLI reference

Extract Inline SchemasTypeScript Angular
\ No newline at end of file diff --git a/guides/server-templates/typescript-koa.html b/guides/server-templates/typescript-koa.html index 1ec39d0e..74413299 100644 --- a/guides/server-templates/typescript-koa.html +++ b/guides/server-templates/typescript-koa.html @@ -1,4 +1,4 @@ -Using the typescript-koa template – OpenAPI Code Generator
GuidesServer TemplatesTypeScript Koa

Using the typescript-koa template

+Using the typescript-koa template – OpenAPI Code Generator
GuidesServer TemplatesTypeScript Koa

Using the typescript-koa template

The typescript-koa template outputs scaffolding code that handles the following:

  • Building a @koa/router instance with all routes in the openapi specification
  • @@ -162,4 +162,4 @@

    message: "internal server error", } satisfies t_Error } -}

\ No newline at end of file +}
TypeScript FetchUse with React Query
\ No newline at end of file diff --git a/guides/use-with-react-query.html b/guides/use-with-react-query.html index 9f9c3e6e..d503cd6e 100644 --- a/guides/use-with-react-query.html +++ b/guides/use-with-react-query.html @@ -1,4 +1,4 @@ -Using with tanstack react-query – OpenAPI Code Generator
GuidesUse with React Query

Using with tanstack react-query

+Using with tanstack react-query – OpenAPI Code Generator
GuidesUse with React Query

Using with tanstack react-query

Tanstack Query is a popular data fetching library for react applications. We don’t offer any out the box integration with it (yet), but it does integrate easily with our generated client SDKs.

Here’s a basic example implementation. It’s not perfect, but it should give you a good starting point.

@@ -163,4 +163,4 @@

<button onClick={() => doUpdate.mutate("123", {title: "new title"})}/> </div> } -

\ No newline at end of file +
TypeScript KoaCLI Options
\ No newline at end of file diff --git a/index.html b/index.html index a1a6eff5..0b9c5f78 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -OpenAPI Code Generator
\ No newline at end of file +OpenAPI Code Generator
\ No newline at end of file diff --git a/overview/about.html b/overview/about.html index ab27203f..964b6c53 100644 --- a/overview/about.html +++ b/overview/about.html @@ -1,4 +1,4 @@ -Welcome – OpenAPI Code Generator
OverviewAbout

Welcome

+Welcome – OpenAPI Code Generator
OverviewAbout

Welcome

@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, OpenAPI 3.1, and TypeSpec are supported an input specifications.

@@ -49,4 +49,4 @@

Tackles the program space from both ends - client and server, for a single source of truth
  • Comprehensive runtime parsing/validation in addition to static compile time safety
  • -

    So if you want a low risk, write-once, get strong build & runtime guarantees experience then we’re worth giving a try.

    \ No newline at end of file +

    So if you want a low risk, write-once, get strong build & runtime guarantees experience then we’re worth giving a try.

    \ No newline at end of file diff --git a/overview/compatibility.html b/overview/compatibility.html index 7e227879..059c9ce2 100644 --- a/overview/compatibility.html +++ b/overview/compatibility.html @@ -1,4 +1,4 @@ -Compatibility Tables – OpenAPI Code Generator
    OverviewCompatibility

    Compatibility Tables

    +Compatibility Tables – OpenAPI Code Generator
    OverviewCompatibility

    Compatibility Tables

    This page aims to document which parts of the openapi 3.1.0 specification is supported. It may not be totally complete / accurate, but it should be broadly correct and give you an understanding of what does / doesn’t work.

    @@ -117,4 +117,4 @@

    AttributeSupportedNotesauthorizationUrl🚫tokenUrl🚫refreshUrl🚫scopes🚫

    Security Requirement Object - Patterned Fields

    The security requirement object is completely unsupported.

    -
    AttributeSupportedNotes
    \{name\}🚫
    \ No newline at end of file +
    AttributeSupportedNotes
    \{name\}🚫
    \ No newline at end of file diff --git a/overview/roadmap.html b/overview/roadmap.html index 9150acf2..ba18b186 100644 --- a/overview/roadmap.html +++ b/overview/roadmap.html @@ -1,4 +1,4 @@ -Roadmap – OpenAPI Code Generator
    OverviewRoadmap

    Roadmap

    +Roadmap – OpenAPI Code Generator
    OverviewRoadmap

    Roadmap

    This is a very loosely ordered view of known things that are planned in the roadmap. It’s probably not exhaustive.

    Near-term - “Sometime in the next 6 months”

    These are broadly speaking the known blockers to doing the first v1 release.

    @@ -47,4 +47,4 @@

    $request.path.id

    Whilst interesting, it’s also uncommon - currently there isn’t a single usage of this feature in the specifications we use for our integration tests.

    ref: https://spec.openapis.org/oas/v3.1.1.html#link-object

    Support callbacks

    The callbacks field of an operation is similar to the links response object, in that it provides a way to specify callbacks related to an operation.

    Much like links, it’s uncommon to see this used in practice, without a single callbacks -object defined in any specifications we see.

    ref: https://spec.openapis.org/oas/v3.1.1.html#callback-object

    \ No newline at end of file +object defined in any specifications we see.

    ref: https://spec.openapis.org/oas/v3.1.1.html#callback-object

    CompatibilityQuick Start
    \ No newline at end of file diff --git a/overview/schema-first-design.html b/overview/schema-first-design.html index 8bc5d911..deac271d 100644 --- a/overview/schema-first-design.html +++ b/overview/schema-first-design.html @@ -1,4 +1,4 @@ -Why schema first – OpenAPI Code Generator
    OverviewSchema-first design

    Why schema first

    +Why schema first – OpenAPI Code Generator
    OverviewSchema-first design

    Why schema first

    Broadly speaking there are two approaches people take to maintaining API specifications:

    • Schema first, where you write the schema by hand
    • @@ -32,4 +32,4 @@

      Generating a good specification from your code, therefore requires including all this extra metadata in the code, which can make the code more difficult to work with.

      -

      We prefer to separate these concerns out into the specification, and keep the implementation code leaner and simpler.

    \ No newline at end of file +

    We prefer to separate these concerns out into the specification, and keep the implementation code leaner and simpler.

    \ No newline at end of file diff --git a/reference/cli-options.html b/reference/cli-options.html index 7a8e576a..f7a866d6 100644 --- a/reference/cli-options.html +++ b/reference/cli-options.html @@ -1,4 +1,4 @@ -CLI Options – OpenAPI Code Generator
    ReferenceCLI Options

    CLI Configuration Reference

    +CLI Options – OpenAPI Code Generator
    \ No newline at end of file +

    Displays help text for command

    \ No newline at end of file diff --git a/reference/release-notes.html b/reference/release-notes.html index 558b0c1b..7217f6e6 100644 --- a/reference/release-notes.html +++ b/reference/release-notes.html @@ -1,4 +1,4 @@ -Release notes – OpenAPI Code Generator
    ReferenceRelease Notes

    Release notes

    +Release notes – OpenAPI Code Generator
    ReferenceRelease Notes

    Release notes

    💡

    This page is statically generated from the Github releases, and may sometimes be slightly out of date.

    2 Nov 2024 (v0.16.0)

    Client class exports will now be given unique names generated from the input specifications info.title field. This can additionally be overridden through a new cli arg --override-specification-title.

    The previous generic exports are kept for backwards compatibility.

    POTENTIALLY BREAKING: Filenames generated from tags or route prefixes will now follow kebab-case naming convention by default. This can be customized to other conventions like camel-case, etc using --filename-convention

    Features

    Full Changelog: https://github.com/mnahkies/openapi-code-generator/commits/v0.1.0

    \ No newline at end of file +

    Full Changelog: https://github.com/mnahkies/openapi-code-generator/commits/v0.1.0

    \ No newline at end of file