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. In the same reason, I've changed naming strategy of JSON schema (IJsonComponents
) to be much simpler.
Also, fixed a bug occurred only when tsconfig.json
has configured exactOptionalPropertyTypes
option and utilizing Partial<T>
and Required<T>
types.
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 - Fix #827 - change setup wizard logic. by @samchon in #828
- Fix samchon/nestia#628 -
exactOptionalPropertyTypes
's withPartial<T>
andRequired<T>
types. by @samchon in #829
Full Changelog: v5.0.5...v5.1.5