raml-dotnet-tools icon indicating copy to clipboard operation
raml-dotnet-tools copied to clipboard

Generating RAML at build time

Open davidkeaveny opened this issue 8 years ago • 3 comments

Are there any plans to allow the generation of RAML at build time? I love RAML for contract-first development, but right now I am working on an existing API for which I need to take a code-first approach.

Now while the RamlApiExplorer code is great for exposing the RAML definition of your API when the API is running, I want to be able to generate RAML as part of my build process, so that definition can be used to e.g. generate clients in C# and TypeScript as part of that build, so that I can start consuming the latest API feature in my apps without having to wait for the API to be hosted somewhere. I can also then save those definitions and diff with previous versions to identify breaking changes in backwards compatibility, which could even be used to fail the build (how awesome is that?).

So in other words, I would really like there to be a .exe (or even a .dll with some MSBuild .targets) that I can call in the AfterBuild phase of an MSBuild .csproj, point it at one or more DLLs that contains my API controllers and DTOs, and have a single RAML definition generated from that.

Does that scratch anyone else's itch?

davidkeaveny avatar Jun 21 '16 23:06 davidkeaveny

Hi David, we have built the command line tool with that in mind. Let us know how it goes for you.

woodp avatar Jun 22 '16 00:06 woodp

The command line tool is great if you already have a RAML definition and want to create a client or controller; but as I said, I'm working in a code-first environment where I already have my controllers, and I want to be able to create the RAML definition at build-time, so that other steps in my build process can consume that definition (no doubt using the command line tool that you mention).

davidkeaveny avatar Jun 22 '16 00:06 davidkeaveny

will consider your request David, thanks for the feedback

woodp avatar Jul 01 '16 16:07 woodp