postman-open-technologies / microcks

This is a repo for managing our microcks partnership.
Apache License 2.0
1 stars 0 forks source link

Repository Organization #1

Open kinlane opened 2 years ago

kinlane commented 2 years ago

I would like to create an API blueprint for how repositories should be organized, publish it as a formal blueprint at APIs.How, and use to tell a story about this level of organization within API operations.

lbroudoux commented 2 years ago

Repository Organization in Microcks stands for the way you classify the API & Services of the repository of a Microcks instance. But the first thing to consider may be : how many Microcks instance may you have in your organization?

On Microcks instances organization

From field feedback, we’ve seen different approaches following those patterns :

The « one Microcks per developer on her laptop » is also a pattern we saw but that is much more transitional before actually deploying distributed or central instances.

Microcks features

Microcks has specific features for managing these different patterns :

As you see, labels are a very important point in Microcks repository organization - they have the same role than in Kubernetes. But how can you set labels to an API? There are different ways of doing this:

Git repository organization

The last topic I foresee about repository organization in the Microcks context is the question of the Git repository holding the API artifacts organization.

Form the field, we’ve seen many different things - depending on the human organization and its maturity regarding domain driven design most of the time. However, there’s this particular organization that is described below and that I tend to promote:

https://git.acme.com/<domain_1>
  /apis | products
    /sub-domain
      myapi-openapi-v1.0.yaml
      myapi-apimetadata-v1.0.yaml
      myapi-collection-tck-v1.0.json
      myevent-asyncapi-v1.0.yaml

  /app_1 | microservice_1   
    /src/main
      /java
      /resources
        myapi-openapi-v1.0.yaml
    /tests
      myapi-collection-dataset-v1.0.json

  /staging
    /app_1 | microservice_1 
      myapi-collection-ua-dataset-v1.0.json
      myapi-collection-perf-dataset-v1.0.json

Some explanations: