npm swagger-typescript-api 7.0.0
7.0.0 Release

latest releases: 13.0.23, 13.0.22, 13.0.21...
3 years ago

BREAKING_CHANGES:

  • format namespace name in --route-types as camelCase with upper first capitalized letter
    foo_bar -> FooBar

Fixes:

  • Incorrect working the --route-types option with --modular option (route types should be splitted on files)
  • Fix critical bug linked with enums with boolean type (thanks @haedaal)

Features:

  • Ability to return false in onCreateRoute hook, it allow to ignore route
  • Add output util functions
  createFile: (params: {
    path: string;
    fileName: string;
    content: string;
    withPrefix?: boolean;
  }) => void;
  renderTemplate: (
    templateContent: string,
    data: Record<string, unknown>,
    etaOptions?: import("eta/dist/types/config").PartialConfig
  ) => string;
  getTemplate: (params: {
    fileName?: string;
    name?: string;
    path?: string;
  }) => string
  formatTSContent: (content: string) => string;


  // ...

  generateApi({ /* ... */ }).then(({ createFile, renderTemplate, getTemplate }) => {
    // do something
  })

Don't miss a new swagger-typescript-api release

NewReleases is sending notifications on new releases.