DocHub: ็ดณๅฃซ็š„ใชๆ–นๆณ•ใง API

- ใ‚ตใƒƒใ‚ทใƒฅใ€็ฎก็†่€…ใซใ‚ˆใ‚‹ใจใ€400 ๆฉŸใŒๅœฐ็„ใฎใ‚ˆใ†ใซ้ฃ›ใ‚“ใงใ„ใŸใใ†ใงใ™ ๅ•้กŒใŒไฝ•ใงใ‚ใ‚‹ใ‹ใ‚’่ฆ‹ใฆใใ ใ•ใ„ใ€‚

- ใ‚นใƒˆใƒฌใƒณใ‚ธ...ใใ‚Œใงใ‚‚่‰ฏใ‹ใฃใŸใงใ™ใ€‚





ๆ•ฐๆ™‚้–“ๅพŒ...





- ๅŒๅƒšใฎ็š†ใ•ใ‚“ใ€ใพใŸใ—ใฆใ‚‚ๆ‰ฟ่ชใ‚‚้€š็Ÿฅใ‚‚ใชใ—ใซๅฅ‘็ด„ใ‚’ๅค‰ๆ›ดใ—ใพใ—ใŸ! ๅˆใ‚ใฆใ˜ใ‚ƒใชใ„๏ผไฝ•ใจใ‹ใ—ใ‚ˆใ†๏ผ





, . - . , API-.





. ( ) .





. . , PHP . URI .





. , :





  1. , . URI ;





  2. . -, , ;





  3. , .. .





  4. , - , . , , , .





, , , , .





Contract first

. , . . :





  1. . , .. ;





  2. . ;





  3. , . , .





  4. (). .





  5. .





Contract first, . , Confluence. . . . . , .





, , โ€ฆ :





  1. (, Confluence) . , .





  2. - . . , .





  3. , , . . , :  " ?". Confluence . , , , Swagger- Confluence . . "".





(.) ArchOps. DevOps, . . , . , . , ArchOps - .





. , MS Visio Draw.io, PlantUML. .





DocHub ArchOps.





, . , , . , code review.





:





:





  1. Developing target API - . , , . TargetAPI.yaml. ;





  2. Developing feature - . ActualAPI.yaml.





, :





  1. TargetAPI.yaml - Contract first. -, develop . . - develop . . .





  2. ActualAPI.yaml - . , . develop . .1





:





  1. ;





  2. ;





  3. ;





  4. pipeline . , .





โ€ฆ :





  1. ;





  2. โ€œโ€ .





DocHub. , Swagger UI GitLab.





DocHub

DocHub GitLab. DocHub SPA , GitLab backend. , , GitLab.





. dochub.json. . DocHub . . :





. . 





, GitLab, DocHub http/https. , Swagger. .





DocHub

, , .





(src/config.json).





(/dochub.json):





{
  "imports": [ //    (). 
               //       dochub.json 
               //     .
    {
      "project_id": 106, //    GitLab
      "branch": "develop" //       
    }
  ]
}
      
      



(/dochub.json):





{
  "docs": { //   
      "sbs-targetapi": { //   
          "icon": "lightbulb_outline", //    - https://materialdesignicons.com/
          "location": "Sberservice/Backend/ API", //    
          "description": " REST-  ", //  
          "transport" : "gitlab", //    GitLab
          "project_id": 106, //    GitLab
          "branch": "develop", //      
          "source": "app/Core/Docs/TargetAPI.yaml" //     Swagger
      },
      "sbs-realapi": {
          "icon": "lightbulb_outline",
          "location": "Sberservice/Backend/ API",
          "description": " REST-  ",
          "transport" : "http", //         http
          "source": "https://foo.site/api/v1/docs/api-docs.json"
      }
  }
}
      
      



  • docs, . .





  • imports, , .





DocHub , .





, .





DocHub (), . , .





DocHub . . . ArchOps.





, . GNU GPL v.2 Open source license. . - !





https://github.com/RabotaRu/DocHub








All Articles