nuxtswagger
nuxtswagger copied to clipboard
Enclose object keys in string if it contains numbers
Fixes a bug where it generates invalid object syntax if your swagger spec contains a path with a number. For example "/auth/2fa" would generate an object { auth: { 2fa: {...} } } This adds a check that wraps the key in single-quotes if the key contains a number, resulting in correct syntax, for example: { auth: { '2fa': {...} } }