Fails to parse key names containing single quotes
Hunga1 opened this issue · 0 comments
Hunga1 commented
Hello! I'm trying to parse an OpenAPI specification written in YAML that contains a dictionary with key names that are enclosed in single quotes, but the openapi.Parse
function is returning the following error:
2022/07/31 22:24:21 [16:20] unexpected key name
13 | - args:
14 | field: registration
15 | mapping:
> 16 | '0': init
17 | '1': confirmation
^
18 | '2': active
exit status 1
Here is the OpenAPI specification that I'm using to produce the error:
info:
description: Example API
title: Example API
version: 1.0.0
openapi: 3.0.1
paths:
/users:
description: Users
get:
description: Retrieve all users
operationId: ListUsers
x-custom-properties:
- args:
field: registration
mapping:
'0': init
'1': confirmation
'2': active
As far as I know, the YAML is valid syntax and to OpenAPI spec.