nestia icon indicating copy to clipboard operation
nestia copied to clipboard

Nestia v2 -> v3 Migration

Open SatyaanM opened this issue 2 months ago • 1 comments

Hi @samchon , thank you for the great work on nestia and typia! I saw v3 is released and I have some questions about upgrading.

  1. 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
  1. 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

SatyaanM avatar Apr 11 '24 21:04 SatyaanM

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

samchon avatar May 04 '24 14:05 samchon