Skip to content

Commit 00a2b95

Browse files
vyobukhovmoretalk
authored andcommitted
Add support for empty model properties that are valid in OpenAPI
(cherry picked from commit e3421dd)
1 parent 84e4510 commit 00a2b95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/openApi/v3/parser/escapeName.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export function escapeName(value: string): string {
2-
if (value) {
1+
export const escapeName = (value: string): string => {
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)