First, it is too bad that you spent weeks and probably didn&#x27;t find the &quot;right&quot; solution (because it doesn&#x27;t seem to exist).<p>Second, I like your enthusiasm for specs from code ... the problem (opportunity?) today is that the specifications intertwine human readable descriptions &#x2F; summaries with the actual endpoint &#x2F; payload information.<p>I would hate for my devops pipeline to kick-off because somebody fixed a typo in some human focused in-line documentation.  I personally don&#x27;t think it belongs in the code but absolutely agree with the spirit of your comment (if you keep them separate it is more work and they will get out of sync!).<p>The best luck I have is working within the specification (i.e. Swagger) and avoiding doing things that don&#x27;t model well.  This seems backwards, but for most of the development I&#x27;ve been involved with to date it has served the projects well.<p>Interested if others have had luck embedding API specs into code.