DocHub: API in a gentleman's way

- Sash, the admins say that we have 400 flew like hell. Look what the problem is.

“Strange… it was still good.





A couple of hours later ...





- Colleagues, and once again we have changed contracts without approval and notification! This is not the first time! Let's do something about it!





, . - . , 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