New module http
has been newly added.
export namespace http {
export function parameter<T extends boolean | bigint | number | string>(input: string): T;
export function headers<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T>;
export function isHeaders<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T> | null;
export function assertHeaders<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T>;
export function validateHeaders<T extends object>(input: Record<string, string | string[] | undefined>): IValidation<Resolved<T>>;
export function query<T extends object>(input: URLSearchParams): Resolved<T>;
export function isQuery<T extends object>(input: URLSearchParams): Resolved<T> | null;
export function assertQuery<T extends object>(input: URLSearchParams): Resolved<T>;
export function validateQuery<T extends object>(input: URLSearchParams): IValidation<Resolved<T>>;
}
For reference, those features had been developed in @nestia/core
for a long time.
The reason why migrating them from @nestia/core
is to support Fastify
plugin like nestia
case. Also, in the same reason, I've changed naming strategy of JSON schema (IJsonComponents
) to be much simpler.
What's Changed
- Change naming strategy of swagger components. by @samchon in #818
- Close #815 - new module
http
-query
,headeres
andparameter
by @samchon in #819 - Naming strategy of swagger schema. by @samchon in #820
- New type tag
Default
. by @samchon in #821
Full Changelog: v5.0.5...v5.1.3