3 ms·
You should add OpenAPI generation. So that basically the endpoint /openapi.json is auto-generated.
by yupyupyups 10mo ago
You should add OpenAPI generation. So that basically the endpoint /openapi.json is auto-generated.
- winrid 10mo agorelated - someone should take a stab at actually finishing this :) https://github.com/drogonframework/drogon/issues/988 https://github.com/drogonframework/drogon/issues/988
- nesarkvechnep 10mo agoLike most thing in web development, this is backwards. Applications should be generated from the spec, not the other way around.
- yupyupyups 10mo agoCare to explain the advantage of starting off with the spec rather than with code?
- nesarkvechnep 10mo agoBecause, you can iterate on the spec with all the stakeholders without ever writing a line of business logic. There are tools which can create a dummy web server from the specification and you can build clients without implementing business logic. I thought the advantages of spec-first development are obvious but I hope I helped.
- yupyupyups 10mo agoThanks. The advantages of having a spec is obvious to me as well. I'm just not sure why building business logic that generates the spec (that generates the client) is a bad idea. That way you still have a single source of truth, and a spec.