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

Unable to generate using OpenApi Generator #439

Open
kipusoep opened this issue Nov 16, 2022 · 5 comments
Open

Unable to generate using OpenApi Generator #439

kipusoep opened this issue Nov 16, 2022 · 5 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@kipusoep
Copy link

Describe the bug
We noticed today that we're not able to generate the API Client Code anymore for a swagger json file using the OpenApi Generator.
The output window:

16-11-2022 13:13:19: Informational: Connected to test environment '< Local Windows Environment >'
16-11-2022 13:13:21: Exception : Ongeldige Plakboek-indeling (Uitzondering van HRESULT: 0x8004006A (DV_E_CLIPFORMAT))
16-11-2022 13:13:21: Exception : Ongeldige Plakboek-indeling (Uitzondering van HRESULT: 0x8004006A (DV_E_CLIPFORMAT))
16-11-2022 13:17:07: Generating code using OpenApi
16-11-2022 13:17:08: Checking required dependencies
16-11-2022 13:17:08: Polly is already installed
16-11-2022 13:17:08: Installing RestSharp version 106.12.0.0
16-11-2022 13:17:08: Successfully installed RestSharp version 106.12.0.0
16-11-2022 13:17:08: Installing JsonSubTypes version 1.8.0.0
16-11-2022 13:17:08: Successfully installed JsonSubTypes version 1.8.0.0
16-11-2022 13:17:08: Newtonsoft.Json is already installed
16-11-2022 13:17:08: Package is a system library
16-11-2022 13:17:08: Project filename = C:\MaskedPathToProject.csproj
16-11-2022 13:17:08: Skipping package installation
16-11-2022 13:17:08: Package is a system library
16-11-2022 13:17:08: Project filename = C:\MaskedPathToProject.csproj
16-11-2022 13:17:08: Skipping package installation
16-11-2022 13:17:08: Package is a system library
16-11-2022 13:17:08: Project filename = C:\MaskedPathToProject.csproj
16-11-2022 13:17:08: Skipping package installation

The exception in English is: Invalid Clipboard Format.

After this nothing happens.

Support Key: c9bcd0a Found in Tools -> Options -> REST API Client Code Generator - Analytics

To Reproduce
Steps to reproduce the behavior:

  1. Generate client code for a swagger.json using OpenApi Generator

Visual Studio Extension (please complete the following information):

  • Visual Studio Version: 2022, 17.4.1
  • Extension Version: 1.5.72
@christianhelle christianhelle self-assigned this Nov 16, 2022
@christianhelle christianhelle added the bug Something isn't working label Nov 16, 2022
@christianhelle
Copy link
Owner

@kipusoep Thanks for reporting this

It was a bit hard, but I managed to succeed with reproducing the error you described. I haven't identified the exact problem yet but it seems that the download process for the latest version of OpenAPI Generator failed, at least for me.

Workaround:
If you already have the Swagger.json file in your project then you should be able to Run Custom Tool. That's how I managed to get it to work after I managed to reproduce the error

image

I'll work on identifying the real problem and come up with fix as soon as I can

@kipusoep
Copy link
Author

Thanks for the quick work-around, fixed the issue for now!

@kipusoep
Copy link
Author

Haha today I ran into this again without realising I already created this bug report and forgot about the work-around.
So I found my own bug report when looking for the issue 😅

Did you ever find the actual cause?

@christianhelle
Copy link
Owner

@kipusoep To be honest, I had to park this as I didn't get any further. Sorry about that! I should actually try to revisit it.

@kipusoep
Copy link
Author

No need to apologize whatsoever! :-)

@christianhelle christianhelle added the help wanted Extra attention is needed label Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants