OptionalassertWhether to assert parameter types or not.
If you configure this property to be true, all of the function parameters
of SDK library would be checked through typia.assert<T>()
function.
This option would make your SDK library compilation time a little bit slower, but would enahcne the type safety even in the runtime level.
OptionalcloneWhether to clone DTO structures or not.
If being configured, all of DTOs used in the backend server would be cloned
into the structures directory, and the SDK library would be refer to the
cloned DTOs instead of the original.
OptionaldistributeTarget directory that SDK distribution files would be placed in.
If you configure this property and runs npx nestia sdk command,
distribution environments for the SDK library would be generated.
After the SDK library generation, move to the distribute directory, and
runs npm publish command, then you can share SDK library with other
client (frontend) developers.
Recommend to use "packages/api" value.
Optionale2eTarget directory that e2e test functions would be placed in.
If you configure this property and runs npx nestia e2e command,
@nestia/sdk will analyze your NestJS backend server code, and generates
e2e test functions for every API endpoints.
If not configured, you can't run npx nestia e2e command.
Accessor of controller classes.
You can specify target controller classes within two ways.
INestApplication instanceOptionaljsonWhether to optimize JSON string conversion 10x faster or not.
If you configure this property to be true, the SDK library would utilize
the typia.assertStringify<T>() function to boost up JSON
serialization speed and ensure type safety.
This option would make your SDK library compilation time a little bit slower, but would enhance JSON serialization speed 10x faster. Also, it can ensure type safety even in the runtime level.
OptionalkeywordOptionaloutputResponse directory that SDK would be placed in.
If not configured, you can't build the SDK library.
OptionalprimitiveWhether to wrap DTO by primitive type.
If you don't configure this property as false, all of DTOs in the SDK
library would be automatically wrapped by Primitive type.
For refenrece, if a DTO type be capsuled by the Primitive type, all
of methods in the DTO type would be automatically erased. Also, if the DTO
has a toJSON() method, the DTO type would be automatically converted to
return type of the toJSON() method.
OptionalpropagateWhether to use propagation mode or not.
If being configured, interaction functions of the SDK library would perform the propagation mode. The propagation mode means that never throwing exception even when status code is not 200 (or 201), but just returning the IPropagation typed instance, which can specify its body type through discriminated union determined by status code.
OptionalsimulateAllow simulation mode.
If you configure this property to be true, the SDK library would be
contain simulation mode. In the simulation mode, the SDK library would not
communicate with the real backend server, but just returns random mock-up
data with requestion data validation.
For reference, random mock-up data would be generated by
typia.random<T>() function.
OptionalswaggerBuilding swagger.json is also possible.
If not specified, you can't build the swagger.json.
Definition for the
nestia.config.tsfile.Author
Jeongho Nam - https://github.com/samchon