question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[next] Major release notes & plans

See original GitHub issue

The @nestjs/swagger is one of the most widely used @nestjs packages under the @nestjs organization. So far it works pretty great - we have a declarative way to easily generate OpenAPI specification using decorators placed near to our DTOs/routes, we cover 3/4 potential use-cases providing a quite simple API to interact with.

However, the current model of this library doesn’t fit the requirements which we should set ourselves in order to ensure that we provide the best quality for developers. Let me list a number of them.

  • massive redundancy (lots of decorators that shouldn’t be required)
  • lack of consistency (if we want to change our property to an optional one, we very likely have to add @IsOptional() - for the validation purposes, change the decorator to @ApiModelPropertyOptional() and add a question ? mark by the end of the property name)
  • no generics support
  • no interfaces support
  • no auto-response schemas generation
  • lack of flexibility (hard to add custom rules/decorators/interpreters)
  • no circular-dependencies support

The main reason for all of these outlined issues is weak TypeScript reflection capability. Hence, the library itself will be very likely rewritten and will use TypeScript AST to support all these amazing features out-of-the-box.

I have created this issue in order to share plans with you as well as encourage you to share your personal experiences with this library - if there is something else that was very troublesome/unsupported so far, please, let me know here - we can work on the design specification together.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:163
  • Comments:29 (9 by maintainers)

github_iconTop GitHub Comments

46reactions
MumblesNZcommented, Mar 5, 2019

+1 for the support for OpenAPI 3.0, great work on nestjs in general BTW =).

24reactions
nartccommented, Feb 18, 2019

Is OpenAPI 3.0 taken into consideration? And also, an abstraction for controllers coverage/approach with Swagger enabled would be awesome. Right now, @Apixxx decorators make it quite hard to implement a BaseController (for lack of better name). ApiUseTags and then the responses types (as you stated, no generics support)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to write release notes (+5 great examples) | Appcues Blog
Below are five examples of great release notes and an explanation of how you can emulate them to make a bigger impact with...
Read more >
How to Write Release Notes Your Users Will Actually Read
Do product release notes matter? Yes. Here's how to follow best practices for your release notes and ensure they actually get read.
Read more >
Microsoft Dynamics 365 2022 release wave 2 plan overview
The 2022 release wave 2 plan describes the Microsoft Dynamics 365 features that are planned for release between October 2022 and March 2023....
Read more >
ReleasePlan - The Document Foundation Wiki
As a result, users get new major version every six months with a wide range of features, fixes, and enhancements. In addition, they...
Read more >
Release Notes: What are they & How to Write them? (Free ...
Release notes explain new features added, issues resolved, and improvements in a product or software by the company. Read more!
Read more >

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found