openapi-generators / openapi-generators/openapi-python-client
Getting "Invalid YAML from provided source" error although it worked with Postman and the spec format is JSON
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2k
- Forks
- 293
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Description
I am trying to generate a client for an OpenAPI JSON file but I am getting an error although Postman was able to generate a endpoints:
"Error(s) encountered while generating, client was not created
Invalid YAML from provided source: mapping values are not allowed in this context"
This is the link to the OpenAPI spec: https://github.com/sourcenetwork/defradb/blob/develop/docs/website/references/http/openapi.json
Desktop (please complete the following information):
- OS: Windows 11
- Python Version: 3.12.5
- openapi-python-client version: 0.21.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Download the linked openapi.json and reproduce the failure with openapi-python-client 0.21.2 on Python 3.12.5, then inspect how the generator parses the provided JSON versus YAML. Done means the linked specification is accepted and client generation completes without the reported parsing error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100