mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
Add support for empty model properties that are valid in OpenAPI
This commit is contained in:
parent
14f626fe60
commit
e3421ddcd2
@ -1,5 +1,5 @@
|
||||
export const escapeName = (value: string): string => {
|
||||
if (value) {
|
||||
if (value || value === '') {
|
||||
const validName = /^[a-zA-Z_$][\w$]+$/g.test(value);
|
||||
if (!validName) {
|
||||
return `'${value}'`;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user