Skip to content

chore: init the openapi

Nick Shvab requested to merge openapi-init into development

https://gitlab.com/operator-ict/golemio/code/general/-/issues/302

  1. Added command: "build-docs": "npx openapi-merge-cli"

  2. Config file looks like:

{
    "inputs": [
        {
            "inputFile": "./docs/docsTitle.yaml"
        },
        {
            "inputFile": "./node_modules/@golemio/flow/docs/openapi.yaml"
        },
        {
            "inputFile": "./node_modules/@golemio/sorted-waste-stations/docs/openapi.yaml"
        }
    ],
    "output": "./docs/output.swagger.json"
}
  1. Added route:

this.express.use("/api-docs", swaggerUi.serve, swaggerUi.setup(require("../docs/output.swagger.json")));

image

🚧 Before merge important:

  1. fix "" in lint command
  2. bump **flow ** and **sortedwaste **modules
  3. add build-docs command to pipeline (coz now: Error: Cannot find module '../docs/output.swagger.json')
Edited by Nick Shvab

Merge request reports