-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hey! I ran openapi2cli against Calendly’s OpenAPI spec and hit a few generator bugs.
Spec:
https://raw.githubusercontent.com/robomotionio/openapi-specs/master/calendly.json
Environment:
- openapi2cli: 1.0.0
- Python: 3.12.12
- OS: Linux (NixOS)
Repro:
uvx openapi2cli generate https://raw.githubusercontent.com/robomotionio/openapi-specs/master/calendly.json --name calendly_openapi --output calendly_openapi.py
python calendly_openapi.py --helpWhat I saw:
SyntaxErrorin generated@click.option(... help="...")when descriptions include quotes/newlines.IndentationErroringet_auth_headers()when template emits an emptyelif key:block.- Param mapping issues from heuristics:
- query params get converted to kebab-case keys (
invitee-email) instead of OpenAPI names (invitee_email) - path param routing depends on
"id"in the name, which misses params likeuuid
- query params get converted to kebab-case keys (
Expected behavior:
- generated CLI should compile reliably
- help text should be safely escaped
- params should map by OpenAPI
location+ originalname
I prepared a PR with fixes + tests and will link it here.
Cheers, Art
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels