Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Fails to parse key names containing single quotes #29

Open
Hunga1 opened this issue Aug 1, 2022 · 0 comments
Open

Fails to parse key names containing single quotes #29

Hunga1 opened this issue Aug 1, 2022 · 0 comments

Comments

@Hunga1
Copy link

Hunga1 commented Aug 1, 2022

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant