• AsyncAPI 几个方便的工具


    AsyncAPI 类似openapi 也提供了一些周边工具

    editor

    类似openapi 的,但是目前官方已经不推荐使用了,推荐使用playground,以下是构建一个容器镜像

    • clone 代码
    git  clone https://github.com/asyncapi/editor.git
    • 修改dockerfile
      默认的制作出来的镜像太大了
     
    FROM node:9-alpine
    RUN npm config set registry https://registry.npm.taobao.org
    # Create app directory
    RUN mkdir -p /usr/src/app
    WORKDIR /usr/src/app
    # set default node environment
    ENV NODE_ENV development
    COPY . /usr/src/app
    # Install app dependencies
    RUN npm install
    EXPOSE 5000
    CMD [ "npm", "start" ]
     
    • 使用docker-compose 管理
    version: "3"
    services:
      editor:
        build: ./
        image: dalongrong/asyncapi-editor:1.0.1
        ports:
        - "5000:5000"
    • 构建&&启动
    docker-compose build && docker-compose up -d
    • 效果

    • 说明
      镜像已经push dockerhub 了dalongrong/asyncapi-editor:1.0.1

    playground

    同上以下是镜像构建的过程

    • clone 代码
     
    git  clone https://github.com/asyncapi/playground.git
    • 修改dockerfile
    FROM node:9-alpine
    RUN npm config set registry https://registry.npm.taobao.org
    # Create app directory
    RUN mkdir -p /usr/src/app
    WORKDIR /usr/src/app
    # set default node environment
    ENV NODE_ENV development
    COPY . /usr/src/app
    # Install app dependencies
    RUN npm install
    EXPOSE 5000
    RUN npm install -g forever
    CMD forever -c "npm start" ./
     
    • docker-compose 文件
    version: "3"
    services:
      playground:
        build: ./
        image: dalongrong/asyncapi-playground:1.2.0
        ports:
        - "5000:5000"
     
    • 构建&&启动
    docker-compose build && docker-compose  up -d
    • 效果

    • 说明
      镜像也已经push dockerhub了 dalongrong/asyncapi-playground:1.2.0

    generator

    可以方便的通过yaml 定义文件生成代码,前边有使用过

    参考资料

    https://github.com/asyncapi/playground
    https://github.com/asyncapi/editor

  • 相关阅读:
    键盘弹出后上提view隐藏后下拉view还原并修改scroll过程中旋转屏幕到竖屏view显示错误
    iOS UI Element Usage
    ios notification
    retain和copy还有assign的区别
    UVA-11728 Alternate Task
    UVA-11490 Just Another Problem
    UVA-10127 Ones (数论)
    UVA-10710 Skyscraper Floors (找规律+幂取模)
    UVA-10539 Almost Prime Numbers
    UVA-10692 Huge Mods
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/11629570.html
Copyright © 2020-2023  润新知