Code Monkey home page Code Monkey logo

ariesdoc's Introduction

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

ariesdoc's People

Contributors

fs7744 avatar jungleguo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ariesdoc's Issues

API说明文档,希望增加一些信息

API说明文档,希望可以给出:
1.每个字段的check信息;
2.API的request/response body的数据类型,例如是个dictionary还是list?
3.文档中应包含返回非200之外的其他场景的说明,例如:返回400

添加对URL未使用的参数处理

例:
`HttpPost("example/{param1}")
public object Example(object req)
{

}`
如果没有使用到param1,使用Aries_Doc生成文档会报错

Re-use .NET RAML package

I looked briefly at your project when we added it to the projects directory on raml.org and I was wondering if you were aware of https://github.com/mulesoft-labs/raml-dotnet-apiexplorer (I think this is what this feature uses under the hood).

I am only suggesting it because you may find it useful to reuse this package to generate RAML as it supports most RAML features AFAIU. Feel free to ignore this if you feel it does not add any value to your project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.