New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@tc-libs/doc

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tc-libs/doc

Helper Swagger/OpenAPI per uniformare la documentazione degli endpoint.

latest
npmnpm
Version
3.9.0
Version published
Weekly downloads
27
-69.32%
Maintainers
1
Weekly downloads
 
Created
Source

@tc-libs/doc

Helper Swagger/OpenAPI per uniformare la documentazione degli endpoint.

I decorator principali sono:

  • Doc()
  • DocPaging()
  • DocDefault()
  • DocOneOf()
  • DocAnyOf()
  • DocAllOf()

Cosa fa

Automatizza:

  • ApiConsumes e ApiProduces
  • response standard o paginata
  • header x-custom-lang
  • query di pagination
  • documentazione errori standard del monorepo
  • supporto auth JWT, refresh, API key e permission token

Esempio endpoint standard

@Get(':id')
@Doc('user.get', {
  auth: { jwtAccessToken: true },
  response: {
    serialization: UserGetSerialization,
  },
  request: {
    params: [{ name: 'id', required: true, type: String }],
  },
})

Esempio endpoint paginato

@Get()
@DocPaging('user.list', {
  auth: { jwtAccessToken: true },
  response: {
    serialization: UserListSerialization,
    availableSearch: ['email', 'name'],
    availableOrderBy: ['createdAt', 'email'],
  },
})

Tipi utili

  • IDocOptions
  • IDocPagingOptions
  • IDocAuthOptions
  • IDocRequestOptions
  • IDocResponseOptions

Note operative

  • Per upload multipart usa bodyType: FORM_DATA.
  • Per response file usa bodyType: FILE.
  • Il package si appoggia ai serializzatori di @tc-libs/response.

Sviluppo

nx build doc
nx test doc

FAQs

Package last updated on 01 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts