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

Error while importing YAML & Json Swagger files: Unable to parse the Swagger content #649

Open
abdulazizfmw opened this issue Jul 18, 2023 · 1 comment

Comments

@abdulazizfmw
Copy link

Describe the bug
Error while importing YAML & Json Swagger files: Unable to parse the Swagger content

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Rest Project
  2. Upload Swagger file from computer
  3. See error
2023-07-18 12:19:06 java.lang.IllegalArgumentException: Unable to parse the Swagger content.
2023-07-18 12:19:06     at com.castlemock.service.mock.rest.project.converter.swagger.SwaggerRestDefinitionConverter.convertSwagger(SwaggerRestDefinitionConverter.java:158) ~[service-mock-rest-1.63.jar:?]
2023-07-18 12:19:06     at com.castlemock.service.mock.rest.project.converter.swagger.SwaggerRestDefinitionConverter.convert(SwaggerRestDefinitionConverter.java:121) ~[service-mock-rest-1.63.jar:?]
2023-07-18 12:19:06     at com.castlemock.service.mock.rest.project.ImportRestDefinitionService.process(ImportRestDefinitionService.java:74) ~[service-mock-rest-1.63.jar:?]
2023-07-18 12:19:06     at com.castlemock.service.core.ServiceProcessorImpl.process(ServiceProcessorImpl.java:85) ~[service-core-1.63.jar:?]
2023-07-18 12:19:06     at jdk.internal.reflect.GeneratedMethodAccessor131.invoke(Unknown Source) ~[?:?]

Expected behavior
File imported and generate the mock

Screenshots
Swagger files are valid:
image

image

Castle Mock

  • Version 1.63
  • Java Version 11.0.14.1

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
@abdulazizfmw
Copy link
Author

abdulazizfmw commented Jul 18, 2023

@karldahlgren
Same issue with the latest Docker image 1.65

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

1 participant