nestia
nestia copied to clipboard
Nestia v2 -> v3 Migration
Hi @samchon , thank you for the great work on nestia and typia! I saw v3 is released and I have some questions about upgrading.
- Is it possible to disable inferring the Title from the first line of a comment?
- I saw this mentioned on https://github.com/samchon/typia/issues/976
- The broken links from inferred titles were fixed. However, inferring titles breaks some things for me as I can't control the comments if I import types from a package.
- I can submit a PR for this if you'd like
- info.license.identifier and info.license.url is not being generated in the OpenAPI 3.1.0 file. Can I configure these values somewhere or is this not supported?
- https://spec.openapis.org/oas/v3.1.0#license-object
Sorry for long time waiting.
Automatic JsonSchema.title
composition
As considering the first line terminated with dot (.
) as @summary
or @title
feature was traditional convention from very long time ago (ASDoc, JavaDoc), I don't want to disable it. Instead, you can skip the first line to be @summary
or @title
by not terminating with the dot (.
) characeter.
info.license.identifier
You can configure it onto the nestia.config.ts
file.
import { INestiaConfig } from "@nestia/sdk";
export const NESTIA_CONFIG: INestiaConfig = {
input: ["src/controllers"],
output: "src/api",
swagger: {
output: "swagger.json",
info: { ... },
},
};
export default NESTIA_CONFIG;
https://nestia.io/docs/sdk/swagger/#configuration