Releases: Himenon/openapi-typescript-code-generator
Releases · Himenon/openapi-typescript-code-generator
@himenon/[email protected]
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]
Features
- Support Kubernetes OpenAPI Schema #62
https://github.com/kubernetes/kubernetes/blob/master/api/openapi-spec/swagger.json
@himenon/[email protected]
Bug Fix
- feat: support nullable field of combine schemas (#61)
@himenon/[email protected]
Features
- feat: support property access via reference object #59
New support schema
$ref: "#/components/schemas/Book/properties/author"
@himenon/[email protected]
- fix: Fixed the logic for deleting duplicate TypeAlias #58
@himenon/[email protected]
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]
Update
@himenon/[email protected]
Improved stability
- fix: Trim the trailing slash of baesUrl #55
@himenon/[email protected]
Bug Fix
- Required condition of Parameter Object (@keita1714 in #53 )