NSwag icon indicating copy to clipboard operation
NSwag copied to clipboard

// @ts-nocheck is missing from file header

Open Kokujou opened this issue 1 year ago • 3 comments

i already know that there's a simple hotfix of adding the File.Header.liquid to hotfix_template, because i already needed to add an hotfix for classes without this i see annoying error messages like that overrides are not working, i don't know why you removed this, but please add it back.

Kokujou avatar Jun 13 '24 07:06 Kokujou

Same issue...

jusvit avatar Aug 19 '24 01:08 jusvit

For those that want a workaround

Create a folder like templates/typescript in your C# project then create a file called "File.Header.Liquid"

In that file put

/* tslint:disable */
/* eslint-disable */
// ReSharper disable InconsistentNaming
// @ts-nocheck

Add that directory (Via NSwagStudio) to the templateDirectory field "codeGenerators": { "openApiToTypeScriptClient": { "templateDirectory": "Common/NSwag/Templates/Typescript/","

and it should be good.

I'm not sure why @lahma removed "@ts-nocheck" in his PR #3898 when moving it to its own liquid file, I guess someone doesn't have to work strictly 😂

jusvit avatar Aug 19 '24 02:08 jusvit