Skip to content

CodeBabyBear/AriesDoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AriesDoc

Build status

AriesDoc is help we generate raml doc file form asp.net core.

It base on Microsoft.AspNetCore.Mvc.ApiExplorer.

Quick start


Add configuration

  1. Found your project and right click mouse, choose Edit csproj.
  2. Add below configuration,when you add pelase note DotNetCliToolReference is what we needed rather than PackageReference.
<ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
    <DotNetCliToolReference Include="dotnet-aries" Version="*" /><!--add this-->
</ItemGroup>

This is a necessary step.

How to use

In this step we hypothesis you had add conguration in your csproj. It's easy for us to use this tool.

  • Open the terminal, here we take Windows as an example. Founding the base path of your project.
    Run the command
dotnet publish -c Release
  • Run aries command to export Document
dotnet aries doc -t D:\AriesDoc\ -f D:\Example\bin\Release\netcoreapp2.0\publish -b http://localhost:63298
-- or 
dotnet aries doc -c apidocconfig.json
  • Export success will output
Aries doc generate Done

Finished!

Parameters

  • -t required! You should gave the path where Aries to exported API Doc.
  • -f required! You should point to where the publish folder is.
  • -b required! The base path of your API. Actually, it is not a necessary field, but we recommend it.
  • -s Optional! The start class name of your project. if not given, it would use the default field StartUp
  • -v Optional! The version number of raml. If not given, it would use the default value 1.0.
  • -x Optional! The xml comments file.
  • -c Optional! The config file.

Config file example

{
  "RamlVersion": "1.0",
  "StartupClassName": "Startup",
  "BaseUrl": "http://www.test.com",
  "DocDirectory": "bin\\Release\\netcoreapp2.0\\publish",
  "PublishDllDirectory": "bin\\Release\\netcoreapp2.0\\publish",
  "IsRelativePath": true,
  "XmlCommentsFile": "bin\\Release\\netcoreapp2.0\\doc.xml"
}

The example project is here : https://github.com/CodeBabyBear/AriesDoc/tree/master/test/Example