Skip to content

Commit e3421dd

Browse files
committed
Add support for empty model properties that are valid in OpenAPI
1 parent 14f626f commit e3421dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/openApi/v3/parser/escapeName.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const escapeName = (value: string): string => {
2-
if (value) {
2+
if (value || value === '') {
33
const validName = /^[a-zA-Z_$][\w$]+$/g.test(value);
44
if (!validName) {
55
return `'${value}'`;

0 commit comments

Comments
 (0)