Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency tsoa to v3 - autoclosed #10

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jul 29, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
tsoa 1.3.6 -> 3.9.0 age adoption passing confidence

Release Notes

lukeautry/tsoa

v3.9.0

Compare Source

v3.9.0 (2021-07-31)

Full Changelog

Features:

Chores:

v3.8.0

Compare Source

v3.8.0 (2021-05-16)

Full Changelog

Features:

Fixed bugs:

  • fix(validation): Array of refEnum validation #​994 (WoH)
  • fix: Make output directory creation more robust #​976 (cakoose)

Chores:

v3.7.0

Compare Source

v3.7.0 (2021-04-25)

Full Changelog

Features:

Bugfixes:

Deps:

v3.6.1

Compare Source

v3.6.1 (2021-03-21)

Full Changelog

Fixes:

This restores compatibility with TypeScript <4.1.

v3.6.0

Compare Source

v3.6.0 (2021-03-20)

This version requires TypeScript 4.1. If you are using TS <4.1, please make sure to skip this release and use v3.6.1

Full Changelog

Implemented enhancements:

Fixes:

v3.5.2

Compare Source

v3.5.2 (2021-02-07)

Full Changelog

Fixed bugs:

  • Wrong return for 0 #​889
  • Incorrect variable name in koa.hbs #​863
  • Intersection with Union type composed of more than 2 types not working #​848

Merged pull requests:

v3.5.1

Compare Source

v3.5.1 (2021-01-20)

Full Changelog

Fixes:

  • Error level for (partial) path overlaps has been reduced to a warning

v3.5.0

Compare Source

v3.5.0 (2021-01-16)

Full Changelog

TypeScript: Support for TemplateLiteralStrings, Key remapping in Mapped Types.
OpenAPI changes: Support response header definitions based on interfaces and classes #​857 (jackey8616)
Framework API: Declare path variables at the Controller level #​885 (vincentvanderweele) and adds a new config to automatically send the Status code declared in the @SuccessResponse annotation. #​850 (devnev)

Features:

Fixes:

Chores:

v3.4.0

Compare Source

v3.4.0 (2020-10-18)

Full Changelog

Features:

  • Add support for parenthesized types: Add ParenthesizedType handler to TypeResolver #​816 (gleant)
  • express: RegisterRoutes: accept express.Router, not just express.Application #​814 (cakoose)
  • Add a config option to change the name of the OpenAPI spec: output basename #​807 (lucasrcosta)
  • feat: Add ability to fetch custom IoC container #​803 (alxwrd)

Fixes:

v3.3.0

Compare Source

v3.3.0 (2020-09-26)

Changes after the alpha:

Full Changelog

Features:

  • feat: Add optional x-enum-varnames support #​772 (ml1nk)

Fixes:

Chores:

Internals:

For a list of all changes since v3.2.1, please refer to v3.3.0-alpha.0:

As always, big thank you to everyone who helped with this release, i.e. by submitting PRs and issues.

v3.2.1

Compare Source

Full Changelog

Bugfix:

v3.2.0

Compare Source

v3.2.0

Full Changelog

Features

  • feat: Support multiple response examples #​727 (WoH)
  • feat: specMerge: Validate config and add deepmerge option #​726 (WoH)
  • fix: SpecGen3: Render global tag descriptions if available #​725 (WoH)

Merged pull requests:

  • fix: Don't explicitly set additionalProperties for unknown/any in OpenAPI3 #​729 (WoH)

v3.1.1

Compare Source

Full Changelog

Bugfix:

  • Fix: Make data/status optional in returnHandler bce95cd (WoH)

v3.1.0

Compare Source

Full Changelog

Features:

Bug fixes:

v3.0.8

Compare Source

Full Changelog

Closed issues:

  • README.MD example uses old version of inversify-binding-decorators #​252

Bugfix:

  • Routes: Load ioc module after controllers #​679 (WoH)

v3.0.7

Compare Source

Bug Fixes:

  • fix: validateError instanceof ValidateError should be true #​675

#​661 introduced an issue that affects TypeScript's transpilation of extending Error microsoft/TypeScript#​13965.

We can set the prototype manually and avoid headaches.

v3.0.6

Compare Source

For Upgrades from 2.5, please visit our new docs

Changelog for Beta

Fixed bugs:

  • typescript union should be implemented as anyOf #​671

Closed issues:

  • Nullable enums should contain the value null #​668
  • mapped type: Record\<'foo', string\> #​653
  • Composite types give error on swagger codegen #​649

Merged pull requests:

v3.0.5

Compare Source

New Reference Documentation

Remaining planned breaking changes:

- swagger.(json|yaml)
+ openapi.(json|yaml)

We are planning to offer a setting to change the name of the generated OAS file.

Track the Status of the overall progress towards a stable 3.0 here

Fixed bugs:

  • Aliased void Api Response types document 200 response instead of 204 #​629 (WoH)
  • ValidateError should extend Error #​661 (aldenquimby)

New Features:

Breaking Changes:

  • Use Spec instead of Swagger (tsoa swagger is still available for now, but will be removed eventually) #​664 (WoH)
Calling the tsoa command
- tsoa swagger
+ tsoa spec

- tsoa swagger-and-routes
+ tsoa spec-and-routes

Manually calling spec generation
- await generateSwaggerSpec(swaggerConfig, routesConfig, compilerOptions, config.ignore);
+ await generateSpec(openapiConfig, compilerOptions, config.ignore);

tsoa.json:

{
  "swagger": {}
}

becomes

{
  "spec": {}
}

Instead of duplicating config and handling a lot of edge cases, the new config is a lot simpler.
Config settings, that impact both routes and spec are now located at the top level of the config object.

{
    "entryFile": "./tests/fixtures/express/server.ts",
    "noImplicitAdditionalProperties": "silently-remove-extras",
    "routes": {},
    "spec": {}
}

This means if your settings are different (for example the entry file), you'll have to call the generateRoutes() and generateSpec() yourself.
Note that these methods now have a simpler config aswell:

-    await generateSwaggerSpec(swaggerConfig, routesConfig, compilerOptions, config.ignore);
+    await generateSpec(openapiConfig, compilerOptions, config.ignore);
-    await generateRoutes(routesConfig, swaggerConfig, compilerOptions, config.ignore);
+    await generateRoutes(routesConfig, compilerOptions, config.ignore);

EntryFile and noImplicitAdditionalProperties can now be set on the swagger/routesConfig.

Also, boolean settings for noImplicitAdditionalProperties have been removed: #​503
Valid settings are now: 'throw-on-extras' | 'silently-remove-extras' | 'ignore', everything else falls back to 'ignore'.

For reference, see the TS interface of the entire config here

v3.0.4

Compare Source

Features:

Bugfix:

  • Only add examples that can be serialized to json

v3.0.3

Compare Source

Installation:

yarn add tsoa@v3beta

Breaking Changes:

  • null vs. undefined: Unless you declare a type to accept null, we will no longer mark your optional properties as nullable: true or x-nullable: true

New Features:

Bugfixes:

Perf:

v3.0.2

Compare Source

Breaking Changes:

This is our third release in the (currently beta) v3 branch of tsoa. All of the v3 releases so far have included breaking changes, so please read the v3.0.1 and v3.0.0 release notes as well.

1) Improve nested object validation

See #​574 and #​575

2) Change default behavior when no host is defined:

Explicitly set your host in case you want to have absolute urls. This is a breaking change for those who were using OpenAPI 3, but it actually brings tsoa into parity with how we were handling the host property in Swagger 2. Previously OpenAPI 3 users had to result to passing null which we all felt was strange. Now omitting host will cause tsoa to assume the url should be relative.

3) Remove .. in fieldErrors (145222a):

When detecting illegal additional properties (if you are using tsoa setting additionalProperties: 'throw-on-extras'), the key on the error would contain an additional dot.

{
  "TestModel..additionalProp: : {
    ...
  }
}

This is now fixed and the key is TestModel.additionalProp.

4) Change naming (| from %7C -> OR, & from ~AND to AND)

SwaggerUI has troubles parsing percent encoded URLs that confirm to the OpenAPI standard.
In order to mitigate issues, we changed some of the names.

Example: Pick<Model, 'one' | 'two'> not generates this name in the Spec: Pick_Model.one~OR~two_

We hope this avoids issues and conveniently improves legibility.

Features:
  • Unknown type, ported to 3.x: #​559
Bugfix:
  • Fix OpenAPI3 QueryArrays, ported to 3.x #​564

v3.0.1

Compare Source

v3.0.0

Compare Source

Welcome to the first prerelease in the 3.0 alpha cycle.

New Features:
Support for type aliases

This release comes with proper support for type alias definitions.

They can range from simple scenarios

/**
 * A Word shall be a non-empty sting
 * @&#8203;minLength 1
 */
type Word = string;

to more complex scenarios like unions and intersections of aliases

type IntersectionAlias = { value1: string; value2: string } & TypeAliasModel1;

// or
type OneOrTwo = TypeAliasModel1 | TypeAliasModel2;

or even generic type aliases:

type GenericAlias<T> = T | string;
type ForwardGenericAlias<T, U> = GenericAlias<U> | T;

Please note that this means that tsoa does not only generate the specification (OpenAPI v3 and Swagger2*), but will also validate the input against the types including the jsDoc annotations.

* There may be certain scenarios where we may not be able to generate Swagger 2 from your TypeScript, tsoa will log warnings to infor you about any issues we are aware of.

Support for mapped types

TypeScript 2.1 introduced mapped types, a powerful addition to the type system. In essence, mapped types allow you to create new types from existing ones by mapping over property types. Each property of the existing type is transformed according to a rule that you specify. The transformed properties then make up the new type.
- Marius Schulz, https://mariusschulz.com/blog/mapped-types-in-typescript

tsoa now works with the ts type checker to resolve mapped types. We will actively try to support all cases, however the test suite for now only covers the utility mapped types typescript ships with, like:

/**
 * Make all properties in T optional
 */
type Partial<T> = {
    [P in keyof T]?: T[P];
};

/**
 * Make all properties in T required
 */
type Required<T> = {
    [P in keyof T]-?: T[P];
};

/**
 * Make all properties in T readonly
 */
type Readonly<T> = {
    readonly [P in keyof T]: T[P];
};

/**
 * From T, pick a set of properties whose keys are in the union K
 */
type Pick<T, K extends keyof T> = {
    [P in K]: T[P];
};

One of the types currently not covered yet is the Record type. Please note that this is experimental and there may be cases we unknowingly do not cover yet. Please report any issues you find

Support for conditional types

As of version 2.8, TypeScript supports conditional types. The syntax is very close to the ternary operator and enables expression of 2 (or more) different types based on a condition. Please refer to the TypeScript Handbook for details.

type Diff<T, U> = T extends U ? never : T;  // Remove types from T that are assignable to U

tsoa now works with the ts type checker to resolve conditional types. We will actively try to support most cases, however the test suite for now only covers the utility types typescript ships with, like:

/**
 * Exclude from T those types that are assignable to U
 */
type Exclude<T, U> = T extends U ? never : T;

/**
 * Extract from T those types that are assignable to U
 */
type Extract<T, U> = T extends U ? T : never;

/**
 * Exclude null and undefined from T
 */
type NonNullable<T> = T extends null | undefined ? never : T;
Support for combinations and utility types

The combination of mapped and conditional types allow for powerful utility types like the Omit type.

/**
 * Construct a type with the properties of T except for those in type K.
 */
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;

Again, experimental, there may be issues, please report.

Breaking changes

In order to support type aliases and avoid name clashes, the names for the generated component schemas / definitions may have changed (generic interfaces are affected mostly).
If you rely on the component names generated from tsoa, this is a breaking change.

Because tsoa supported some type aliases in the past and now generated definitions differently, this may break your code.
If you relied on tsoa not supporting type aliases properly to avoid issues, this may break your code.
Proceed with caution and report issues.

I (@​WoH, on behalf of the maintainers) am are excited for your feedback!

ETA?

Feel free to follow the progress of the 3.0.0 release here.

Installation
yarn add tsoa@v3beta

v2.5.14

Compare Source

With our continuing efforts to work on a stable 3.x, here's a small release to address some bugfixes for 2.5.
Please note that after this release, the default master will point to the 3.x branch, so if you want to work on a feature for 2.5, please target the 2.x branch starting today.

Bugfixes:

v2.5.13

Compare Source

For compatibility reasons, we remove collectionFormat for OpenAPI (i.e. Swagger 3). Read more here: https://github.com/lukeautry/tsoa/pull/564

v2.5.12

Compare Source

v2.5.11

Compare Source

Two fixes:

  1. https://github.com/lukeautry/tsoa/pull/554
  2. https://github.com/lukeautry/tsoa/pull/550

v2.5.10

Compare Source

updated our handlebars dependency to ensure we are secure

v2.5.9

Compare Source

Two fixes:

  1. https://github.com/lukeautry/tsoa/issues/525
  2. https://github.com/lukeautry/tsoa/pull/527

v2.5.8

Includes the fix for https://github.com/lukeautry/tsoa/issues/520

v2.5.6

Compare Source

v2.5.5

Compare Source

Releases this bugfix: https://github.com/lukeautry/tsoa/pull/493

v2.5.4

Compare Source

New Features:

Bug Fixes:

v2.5.3

Enhancements:

Fixes:

v2.5.1

Compare Source

Our last release included the very-exciting (and much desired) support for anonymous / inline objects and this release included a few fixes for advanced use cases:

v2.5.0

Compare Source

You asked for the ability to not have to always make an interface for every time. We listened. :)

Enjoy our first swing at fixing https://github.com/lukeautry/tsoa/issues/50 which allows you to have inline nested objects without having to define an interface first.

v2.4.11

Compare Source

If you set specVersion to be 3 in your tsoa.json file's swagger configuration, you can now use unions (i.e. IThing | IOtherThing) and intersections (i.e. IThing & IOtherThing). Thanks goes out to @​WoH for his efforts.

Note: This is not available in specVersion 2 because Swagger does not support oneOf and allOf. However, OpenAPI 3.0 does.

v2.4.10

v2.4.8

Compare Source

  • This fixes one minor bug that was causing issues for users that have a line length lint rule.

v2.4.7

v2.4.5

Compare Source

  • adds warnings to the auto-generated routes.ts file so developers know to not update it manually

v2.4.4

Compare Source

Major enhancements:

Security:

  • tsoa passes yarn audit again

v2.4.3

Compare Source

v2.4.2

Compare Source

v2.4.1

Compare Source

v2.4.0

Compare Source

v2.3.81

Compare Source

v2.3.8

Compare Source

v2.3.7

Compare Source

v2.3.6

Compare Source

v2.3.5

Compare Source

v2.3.4

Compare Source

v2.3.3

Compare Source

v2.3.2

Compare Source

v2.3.1

Compare Source

v2.3.0

Compare Source

v2.2.5

Compare Source

v2.2.4

Compare Source

v2.2.3

Compare Source

v2.2.2

Compare Source

v2.2.1

Compare Source

v2.2.0

Compare Source

v2.1.8

Compare Source

v2.1.7

Compare Source

v2.1.6

Compare Source

v2.1.5

Compare Source

v2.1.4

Compare Source

v2.1.3

Compare Source

v2.1.2

Compare Source

v2.1.1

Compare Source

v2.1.0

Compare Source

v2.0.2

Compare Source

v2.0.1

Compare Source


Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot changed the title Update dependency tsoa to v3 Update dependency tsoa to v3 - autoclosed Oct 19, 2021
@renovate renovate bot closed this Oct 19, 2021
@renovate renovate bot deleted the renovate/tsoa-3.x branch October 19, 2021 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant