Giter Club home page Giter Club logo

atm-whale-api-docs's Introduction

LongPort OpenAPI Documentation

https://open.longportapp.com

CONTRIBUTING

请阅读 CONTRIBUTING.md 文档。

Please following the CONTRIBUTING.md document.

Getting started

$ cd whale-api-docs && yarn
$ yarn dev:swagger
# 新一个终端 Tab
$ yarn dev:zh-HK  #繁体版本
$ yarn dev:en  # EN 版本

浏览器输入 localhost:8000/en 或者 localhost:8000/zh-HK

Canary & Prod 地址找李波

Style Guide

文档需要遵守以下规范:

  • 遵循中英文书写规范,中英文加空格间隔,正确使用标点符号,正确用词,精确专业术语用词、大小写。
  • Longbridge 员工请阅读内部:文案书写指导Open API 接口规范
  • Markdown 文档需要提供规范的 Meta 信息。

Markdown Meta 信息格式

只针对非 Swagger 生成的 Markdown 文档

在每个 .md 文件的开头添加内容(示例):

---
title: '开放平台文档标题'
id: $category_$file_name # category 指文檔分類 file_name 指文档的文件名以中横线分隔的字符串
slug: '/xxx' # 注意前面必须加上 /,例如 /trade-order-create 这样的 slug 保持和 id 一致
sidebar_position: 1 // 显示的顺序,数字越小越靠前
---

Markdown 文档分类

只针对非 Swagger 生成的 Markdown 文档

为了将文档进行分类需要在 docs 中每个子目录添加 category.json 配置文件,文件内容如下:

{
  position: 1, // 显示的顺序,数字越小越靠前
  label: 'OpenAPI 介绍', // 文档分类名称,显示在左边栏
  link: null,
}

特别提示

Markdown 涉及到的静态资源例如:图片、视频等都需要上传到 CDN 再引用,不要放到项目中引用。

不推荐的写法(这样定义会导致加载资源失败的情况)

![流程图片](../../static/xxxx.png)

推荐的写法(从后台上传到 CDN 拿到 CDN 地址,然后在 Markdown 中引用)

![流程图片](https://pub.lbkrs.com/xxx/xxx.png)

Before commit you should be run autocorrect --fix . first How to use autocorrect

atm-whale-api-docs's People

Contributors

ihavecoke avatar sunfuze avatar twosugar avatar huacnlee avatar

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.