agc93 / cake.autorest Goto Github PK
View Code? Open in Web Editor NEWA Cake addin for Azure's AutoRest
License: MIT License
A Cake addin for Azure's AutoRest
License: MIT License
Hi
I'm using Cake.AutoRest trying to automatically generate client from my API.
My pipeline is: build -> generate swagger file (see this issue on Cake.NSwag) -> generate client with Cake.AutoRest
This is an extract of the build.cake
file:
#tool "AutoRest"
#addin nuget:?package=Cake.AutoRest
Task("GenerateClients")
.IsDependentOn("Rebuild")
.Does(() => {
var assemblyPath = softwareBinDirectory.ToString() + "/Software.exe";
NSwag.FromWebApiAssembly(assemblyPath).ToSwaggerSpecification("./swagger.json");
AutoRest.Generate("./swagger.json", settings =>
settings.UseNamespace("Cake")
.UseClientName("Cake.AutoRest")
.AddHeaderComment("Generated by Cake.AutoRest")
.WithGenerator(CodeGenerator.AzureCSharp)
.OutputToDirectory("./dist/client"));
Getting the following output with error:
========================================
GenerateClients
========================================
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'AutoRest.Core, Version=0.17.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
at AutoRest.Program.Main(String[] args)
An error occured when executing task 'GenerateClients'.
Error: Azure AutoRest: Process returned an error (exit code -532462766).
Process terminated with code 1.
I can find the AutoRest.Core assembly in the following directory: ./tools/AutoRest/tools
I'm getting the following error:
Error: The assembly 'Cake.AutoRest, Version=0.1.2.0, Culture=neutral, PublicKeyToken=null' is referencing an older version of Cake.Core (0.13.0). This assembly need to reference at least Cake.Core version 0.16.0. Another option is to downgrade Cake to an earlier version.
Any plan to upgrade to a newer version of Cake.Core
?
Thank you
PS: configuring my
packages.config
file to use Cake0.17.0
instead of0.18.0
is a valid temp workaround
We performed an automated audit of your Cake addin and found that it does not follow all the best practices.
We encourage you to make the following modifications:
.csproj
should have a line similar to this: <PackageReference Include="Cake.Core" Version="0.28.0" PrivateAssets="All" />
.csproj
should have a line like this: <PackageIconUrl>https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png</PackageIconUrl>
.Apologies if this is already being worked on, or if there are existing open issues, this issue was created based on what is currently published for this package on NuGet.org and in the project on github.
Thanks again for creating this Cake Addin, we really appreciate the effort that you have put in to creating it.
We, the Cake Team, recently announced a new Cake Contrib Icon, details of which can be found here:
http://cakebuild.net/blog/2017/06/new-cake-contrib-icon
Would you consider changing the nuspec file for your NuGet Package to use this new Cake Contrib Icon? If so, the recommended URL to use is:
Details of the above URL can be found in the repository here:
https://github.com/cake-contrib/graphics
Please let me know if you have any questions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.