Documentation-driven development for APIs
1–10 of 15 posts
Re: Documentation-driven development for APIs
#2Re: Documentation-driven development for APIs
#3Re: Documentation-driven development for APIs
#4Re: Documentation-driven development for APIs
#5Kinda disappointed. Doctests are nice. You should be able to doctest REST APIs.
Re: Documentation-driven development for APIs
#6At first I thought this might be doc-tests-for-REST. Kinda disappointed. Doctests are nice. You should be able to doctest REST APIs.
Re: Documentation-driven development for APIs
#7IMO something like Apiary [1] and running the blueprint as a mock server is even easier. [1] https://apiary.io/how-apiary-works
Re: Documentation-driven development for APIs
#8Fair, but it seems to be kind of an overkill for simple APIs, specially when it's internal APIs developed by a team that works well together.
Re: Documentation-driven development for APIs
#9Re: Documentation-driven development for APIs
#10As described, there is a disconnect where you went to all the work to create the openapi oas.yaml file, and can feed that to your test client to ensure the API responds to that, but the API still had to be coded by hand to comply with the spec.
A way to feed the oas.yaml code to flask-smorest somehow so it derives the endpoints and schemas from that (hey it already makes a ton of assumptions about how to structure the application, requiring e.g. a set of methods named exactly as the endpoints so they can be easily matched) would make it so the single oas.yaml file drives both ends of the implementation, would make coding work easier as the schema doesn't need to be described multiple times in multiple languages/formats, and would provide quick feedback (FAILURES) if I change the schema without coding the required endpoint support.