Unable to specify output file for contracts classes #5027
Unanswered
travis-practiceprofiles
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not sure if I've just misunderstood something, or whether I've encountered a bug. As far as I can tell there's no way to specify the path of the contracts output file when working with OpenApiReference.
If I use the option "Contracts.cs", that gets passed through as an argument to openapi2csclient like this: "/contractsOutputFilePath:Contracts.cs". But openapi2csclient does not recognise that argument, and generates an exception: ">NConsole.UnusedArgumentException: Unrecognised arguments are present: [/contractsOutputFilePath:Contracts.cs]"
openapi2csclient expects an argument named contractsOutput, which would look like this: "/contractsOutput:Contracts.cs". But "Contracts.cs" is not passed through to the generated command. I can see from the source code ([https://github.com/RicoSuter/NSwag/blob/master/src/NSwag.ApiDescription.Client/NSwag.ApiDescription.Client.targets]) that NSwagContractsOutputFilePath is what is expected there.
I have wondered whether I've managed to reference incompatible versions of the various libraries in my project, but I haven't found any alternative versions that would seem to resolve this. Am I missing something? Or is this parameters in different projects that have gotten out of sync at some point?
I'm guessing that maybe this option is not used very much.
Beta Was this translation helpful? Give feedback.
All reactions