Skip to content

Releases: Himenon/openapi-typescript-code-generator

@himenon/[email protected]

09 Nov 07:59
Compare
Choose a tag to compare

Features

Goooood News!!! Data Types including format are now supported !!!!

  • feat: Support for schema containing format #63

Input Schema

components:
  schemas:
    Binary:
      type: string
      format: binary
    IntOrString:
      type: string
      format: int-or-string
    AandB:
      type: string
      format: A-and-B

Generator Option

import { CodeGenerator, Option } from "@himenon/openapi-typescript-code-generator";
const option: Option = {
  convertOption: {
    formatConversions: [
      {
        selector: {
          format: "binary",
        },
        output: {
          type: ["Blob"],
        },
      },
      {
        selector: {
          format: "int-or-string",
        },
        output: {
          type: ["number", "string"],
        },
      },
      {
        selector: {
          format: "A-and-B",
        },
        output: {
          type: ["A", "B"],
          multiType: "allOf",
        },
      },
    ],
  },
};
const codeGenerator = new CodeGenerator(inputFilename, option);

Output

export namespace Schemas {
    export type Binary = Blob;
    export type IntOrString = number | string;
    export type AandB = A & B;
}

@himenon/[email protected]

07 Nov 03:18
Compare
Choose a tag to compare

@himenon/[email protected]

26 Oct 13:55
Compare
Choose a tag to compare

Bug Fix

  • feat: support nullable field of combine schemas (#61)

@himenon/[email protected]

12 Sep 14:09
Compare
Choose a tag to compare

Features

  • feat: support property access via reference object #59

New support schema

$ref: "#/components/schemas/Book/properties/author"

@himenon/[email protected]

13 Aug 06:04
Compare
Choose a tag to compare
  • fix: Fixed the logic for deleting duplicate TypeAlias #58

@himenon/[email protected]

13 Aug 04:45
Compare
Choose a tag to compare

Bug Fix

  • fix: schema added support for cases where schemas name contains '.' #57

New Support Schema

components:
  schemas:
    Book.Author:   # OK
      type: object
      properties:
        name:
          type: string

@himenon/[email protected]

11 Aug 07:28
Compare
Choose a tag to compare

@himenon/[email protected]

11 Aug 06:52
Compare
Choose a tag to compare

Improved stability

  • fix: Trim the trailing slash of baesUrl #55

@himenon/[email protected]

05 May 08:55
Compare
Choose a tag to compare

Bug Fix

@himenon/[email protected]