This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Description
I'm trying to parse an OpenAPI specification written in YAML that contains a path name that starts with a question mark, but the openapi.Parse function is returning the following error:
2022/07/31 22:47:56 [7:5] unexpected key name
4 | version: 1.0.0
5 | openapi: 3.0.1
6 | paths:? /images/meta/{ImageID}.json
^
8 | : description: Fetch a static image metadata
9 | get:
10 | description: Fetch static image metadata
11 |
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:
? /images/meta/{ImageID}.json
: description: Fetch a static image metadata
get:
description: Fetch static image metadata
operationId: FetchImageMetadata
parameters:
- description: ID of the image
in: path
name: ImageID
required: true
schema:
maxLength: 36
minLength: 36
type: string
pattern: ^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$
responses:
'200':
description: OK
The YAML seems to be valid syntax and is OpenAPI spec.