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

[Bug]: Generation fails with spec issues #5

Open
Haarolean opened this issue Aug 11, 2024 · 5 comments
Open

[Bug]: Generation fails with spec issues #5

Haarolean opened this issue Aug 11, 2024 · 5 comments
Assignees

Comments

@Haarolean
Copy link

What happened?

Some parts of the contract contain invalid spec syntax, like this one: https://github.com/PaddleHQ/paddle-openapi/blob/main/v1/openapi.yaml#L4170

There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
 | Error count: 4, Warning count: 42
Errors: 
	-attribute paths.'/reports'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/customers/{customer_id}/credit-balances'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/customers/{customer_id}'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/discounts'(get).parameters.[['unknown']].in is missing
Warnings: 
	-attribute paths.'/reports'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/customers/{customer_id}/credit-balances'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/customers/{customer_id}'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/discounts'(get).parameters.[['unknown']].in is missing

Steps to reproduce

  1. build via openapi-generator
  2. profit

What did you expect to happen?

to get a bunch of generated classes

Logs

org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
 | Error count: 4, Warning count: 42
Errors: 
	-attribute paths.'/reports'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/customers/{customer_id}/credit-balances'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/customers/{customer_id}'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/discounts'(get).parameters.[['unknown']].in is missing
Warnings: 
	-attribute paths.'/reports'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/customers/{customer_id}/credit-balances'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/customers/{customer_id}'(get).parameters.[['unknown']].in is missing
	-attribute paths.'/discounts'(get).parameters.[['unknown']].in is missing
@Haarolean Haarolean changed the title [Bug]: [Bug]: Generation fails with spec issues Aug 11, 2024
@vijayasingam-paddle
Copy link
Contributor

Hi @Haarolean,
Thank you for raising this issue to us.
I am sorry about this issue. Upon analysis, I can see that one of our script is not working well and are leaving empty objects {} behind.

I will let you know once this issue is fixed.

Thank you.

@vijayasingam-paddle vijayasingam-paddle self-assigned this Aug 12, 2024
@dvrfluxchat
Copy link

hey @vijayasingam-paddle , any idea when this will be done? I am using cloudflare pages to deploy my nextjs app but that is not supported because of some edge runtime issues. I want to create a typesafe client but all the codegen tools are breaking with this openapi spec. would really appreciate any timeline here

@vijayasingam-paddle
Copy link
Contributor

Hello 👋
Sorry for not providing an update to this thread for a while.

We did fix the issue with empty objects({}) but then realized that the openapi-generator was still not happy due to x-enum-descriptions and some other issues with oneOf

We are trying to find the best way to fix the other issues we encountered.
I will let you know once I can successfully generate an SDK.

@dvrfluxchat,
I'm sorry that you had to generate your types manually due to an issue with our Node SDK.
Both issues should be fixed in the next few weeks. However, I recommend using our Node SDK instead of generating types as we can't guarantee how accurate they will be.

Thank you.

@dvrfluxchat
Copy link

Node SDK does not work in edge environment because of the node:crypto module being used in few places, for now i forked the sdk and removed the dependencies and it works fine in edge.

@Haarolean
Copy link
Author

Are there any updates here?

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

3 participants