Comment by dhruv3006

2 months ago

well - the point is. that we wanted to be standards compliant - and want to use existing technologies without actually reiventing a new standard or a proprietary format. (like some of the other api clients took).

and moreover we had this fundamental idea that documentation and testing should be in a single source of truth to avoid documentation drift (not just the spec drift).

And hence we came up with the idea of using markdown as the baseline and doing everything around it.

Is there a way to generate code from these specs? Perhaps via OpenAPI, Smithy, something like that?

  • By code you mean voiden markdown, right ? We do have a OpenAPI schema feature where we support to generate voiden files right now.

    We have it in beta now : https://voiden.md/download (Only Linux and Mac)

    And in the future we also plan to support graphQL but not smithy for now.

    • Well, no. I mean something I can stick in my actual code to ensure it matches the spec, be it through validation, strongly typed interfaces, unit tests or some other mechanism.

      Also, while a nice API document is a godsend (and sadly often missing in practice), a way to generate the consuming side of the API (again via various mechanisms) is also a very useful thing.

      Re-reading the page, perhaps I got it wrong and it works the other way around? Voiden uses e.g. OpenAPI files and verifies it's still compliant with them? That would work, although it's a bit of a double effort.. still, useful in many cases.