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

load error java.lang.Boolean cannot be cast to io.swagger.v3.oas.models.media.Schema. #646

Closed
MishaTyupa opened this issue Apr 26, 2023 · 10 comments · Fixed by #688
Closed
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@MishaTyupa
Copy link

MishaTyupa commented Apr 26, 2023

Description
One example of when it is not working and we are getting a casting error when we try to run specmatic test with swagger YAML file is when we have the following YAML(that's a part of swagger YAML file)

    SomeService:
      type: object
      properties:
        name:
          type: string
          nullable: true
        host:
          type: string
          nullable: true
        hostName:
          type: string
          nullable: true
      **additionalProperties: false**

It cannot be parsed and I'm getting a java error: load error java.lang.Boolean cannot be cast to io.swagger.v3.oas.models.media.Schema. If I remove additionalProperties: false, then it works. So definitely something that can be improved to cast such YAML also. There are more examples when it failed to cast additionalProperties: {} etc.

Steps to reproduce

  1. run specmatic test using swagger open API (3.0.1 version)

Expected result
Tests are executed

@harikrishnan83 harikrishnan83 added the good first issue Good for newcomers label May 5, 2023
@MishaTyupa
Copy link
Author

is there any progress?

@jaydeepk jaydeepk self-assigned this May 15, 2023
@jaydeepk jaydeepk added the bug Something isn't working label May 15, 2023
@jaydeepk
Copy link
Collaborator

Thanks for reporting this issue @MishaTyupa .
We will get back to you once we have a fix ready.

@TheRubble
Copy link

Any updates on this as it's currently stopping our migration from PACT. Happy to pitch in if someone could provide some guidance etc.

@harikrishnan83
Copy link
Member

@MishaTyupa @TheRubble Thank you for your patience. We just merge the fix for this issue. And this will be part of our upcoming release. We will keep you posted on this thread.
cc @jaydeepk @joelrosario

@TheRubble
Copy link

Thanks ever so much, do you have any idea on when the next release is?

@joelrosario
Copy link
Member

@TheRubble We've just released 0.73.0.

@jaydeepk
Copy link
Collaborator

jaydeepk commented Aug 4, 2023

The fix for this has been released in v 0.73.0.
Please feel free. to reopen if the issue persists.

@jaydeepk jaydeepk closed this as completed Aug 4, 2023
@MishaTyupa
Copy link
Author

MishaTyupa commented Aug 5, 2023 via email

@harikrishnan83
Copy link
Member

@MishaTyupa Thanks. Yes, please do create another ticket to track the issue where Specmatic is not able to parse {version} variable when it is a substring of a path part.

@MishaTyupa
Copy link
Author

MishaTyupa commented Aug 5, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants