Create a Github repository (API)
Use the MDTP Catalogue to scaffold a new API microservice repository that follows platform conventions. This step ensures your code starts with the correct directory structure, routes, and documentation files.
About this page. Adapted from documentation I wrote for a government platform. Platform and team names, infrastructure details, repository names and internal references have been removed or replaced. The structure, the writing and the approach are as I wrote them.
Scaffold a new repository from the platform template, so your code starts with the correct structure, routes and documentation files.
Before you start
You need access to the platform catalogue, and a name for your API that follows the platform naming convention. If you are unsure about the name, your platform support channel can check it before you build.
Create the repository
- In the platform catalogue, go to Create repository.
- For repository type, select Service.
- Choose the type that matches your API:
API serviceAPI service with database
- Enter your API's name.
- Select Build.
The platform creates the repository and commits the template files to it.
What you get
The template gives you five files. You will edit the definition, specification and overview as you build. Leave the controller and routes as generated.
| File | What it is for |
|---|---|
/app/DocumentationController.scala | Serves your API definition and documentation |
/conf/definition.routes | Routes for the documentation endpoints |
/resources/definition.json | Your API definition, including versions and access levels |
/resources/application.yaml | Your OpenAPI specification |
/resources/overview.md | The overview shown to developers browsing your API |
Check it worked
- In the platform catalogue, open the repositories dashboard and find your service.
- Under Code, select Commissioning state and confirm the repository shows as created.
- Clone it locally and confirm the five files are present:Replaceterminal
git clone <REPOSITORY_URL><REPOSITORY_URL>with the clone URL shown in the catalogue.
If the repository does not appear within a few minutes, ask in your platform support channel. Once it exists, you can create app configuration.
Create a Github repository (API)
Use the MDTP Catalogue to scaffold a new API microservice repository that follows platform conventions. This step ensures your code starts with the correct directory structure, routes, and documentation files.
About this page. Adapted from documentation I wrote for a government platform. Platform and team names, infrastructure details, repository names and internal references have been removed or replaced. The structure, the writing and the approach are as I wrote them.
Scaffold a new repository from the platform template, so your code starts with the correct structure, routes and documentation files.
Before you start
You need access to the platform catalogue, and a name for your API that follows the platform naming convention. If you are unsure about the name, your platform support channel can check it before you build.
Create the repository
- In the platform catalogue, go to Create repository.
- For repository type, select Service.
- Choose the type that matches your API:
API serviceAPI service with database
- Enter your API's name.
- Select Build.
The platform creates the repository and commits the template files to it.
What you get
The template gives you five files. You will edit the definition, specification and overview as you build. Leave the controller and routes as generated.
| File | What it is for |
|---|---|
/app/DocumentationController.scala | Serves your API definition and documentation |
/conf/definition.routes | Routes for the documentation endpoints |
/resources/definition.json | Your API definition, including versions and access levels |
/resources/application.yaml | Your OpenAPI specification |
/resources/overview.md | The overview shown to developers browsing your API |
Check it worked
- In the platform catalogue, open the repositories dashboard and find your service.
- Under Code, select Commissioning state and confirm the repository shows as created.
- Clone it locally and confirm the five files are present:Replaceterminal
git clone <REPOSITORY_URL><REPOSITORY_URL>with the clone URL shown in the catalogue.
If the repository does not appear within a few minutes, ask in your platform support channel. Once it exists, you can create app configuration.
Create a Github repository (API)
Use the MDTP Catalogue to scaffold a new API microservice repository that follows platform conventions. This step ensures your code starts with the correct directory structure, routes, and documentation files.
About this page. Adapted from documentation I wrote for a government platform. Platform and team names, infrastructure details, repository names and internal references have been removed or replaced. The structure, the writing and the approach are as I wrote them.
Scaffold a new repository from the platform template, so your code starts with the correct structure, routes and documentation files.
Before you start
You need access to the platform catalogue, and a name for your API that follows the platform naming convention. If you are unsure about the name, your platform support channel can check it before you build.
Create the repository
- In the platform catalogue, go to Create repository.
- For repository type, select Service.
- Choose the type that matches your API:
API serviceAPI service with database
- Enter your API's name.
- Select Build.
The platform creates the repository and commits the template files to it.
What you get
The template gives you five files. You will edit the definition, specification and overview as you build. Leave the controller and routes as generated.
| File | What it is for |
|---|---|
/app/DocumentationController.scala | Serves your API definition and documentation |
/conf/definition.routes | Routes for the documentation endpoints |
/resources/definition.json | Your API definition, including versions and access levels |
/resources/application.yaml | Your OpenAPI specification |
/resources/overview.md | The overview shown to developers browsing your API |
Check it worked
- In the platform catalogue, open the repositories dashboard and find your service.
- Under Code, select Commissioning state and confirm the repository shows as created.
- Clone it locally and confirm the five files are present:Replaceterminal
git clone <REPOSITORY_URL><REPOSITORY_URL>with the clone URL shown in the catalogue.
If the repository does not appear within a few minutes, ask in your platform support channel. Once it exists, you can create app configuration.