Let’s say I had a few microservices in different repositories and they communicated over HTTP using JSON. Some services are triggered directly by other microservices, but others can be triggered by events like a timer going off, a file being dropped into a bucket, a firewall rule blocking X amount of packets and hitting a threshold, etc.

Is there a way to document the microservices together in one holistic view? Maybe, how do you visualise the data, its schema (fields, types, …), and its flow between the microservices?


Bonus (optional) question: Is there a way to handle schema updates? For example generate code from the documentation that triggers a CI build in affected repos to ensure it still works with the updates.

Anti Commercial-AI license

You are viewing a single thread.
View all comments
6 points

Generate code from documentation

Let me stop you right there. If you want to generate API bindings, those should be generated from code, along with the documentation, not through it.

permalink
report
reply
1 point

Generate API bindings from code? Then what’s the code for? Do you have an example?

OpenAPI can generate bindings from their spec, but the spec only seems to describe a single microservice.

Anti Commercial-AI license

permalink
report
parent
reply
1 point

I feel like this is just confusing specification with documentation.

Code generated from a specification, and documented. Swagger using the same specification could maybe sort of be documentation

permalink
report
parent
reply
1 point

For a while Peertube solely used OpenAPI to document the project. That’s spec, documentation, and code generation in one. Dunno when they switched to a separate documentation tech + OpenAPI, but it’s there.

permalink
report
parent
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 3.2K

    Monthly active users

  • 1.8K

    Posts

  • 30K

    Comments