Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add charges_from_date to InvoiceObject #22

Closed
lorddaedra opened this issue Mar 11, 2023 · 2 comments
Closed

Add charges_from_date to InvoiceObject #22

lorddaedra opened this issue Mar 11, 2023 · 2 comments

Comments

@lorddaedra
Copy link
Contributor

lorddaedra commented Mar 11, 2023

prance.ValidationError: ("Required list has not defined properties: ['charges_from_date']", <unset>, (), None, (), <unset>, <unset>, <unset>, (), None)

Try to execute this command to get error:

$ python -m pip install -U openapi3-parser && \
python -c "from openapi_parser import parse; specification = parse('https://raw.githubusercontent.com/getlago/lago-openapi/main/swagger.yaml')"

Is required for: getlago/lago-python-client#95

@lorddaedra
Copy link
Contributor Author

lorddaedra commented Mar 11, 2023

Interesting,

openapi-spec-validator-0.4.0 -> error
openapi-spec-validator-0.5.5 -> OK

@lorddaedra
Copy link
Contributor Author

lorddaedra commented Mar 11, 2023

We have charges_from_date in required list inside InvoiceObject. But we do not have the same charges_from_date inside properties list. This is not OpenAPI spec bug. Validation passes.

Related issue: python-openapi/openapi-spec-validator#97

But this is bug of your API contract with end users because of charges_from_date property exists in InvoiceObject here: https://doc.getlago.com/docs/api/invoices/invoice-object

@lorddaedra lorddaedra changed the title Fix OpenAPI validation error - Required list has not defined properties: ['charges_from_date'] Add charges_from_date to InvoiceObject Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants