There is a framework in every language I've worked with that will generate the OpenAPI schema for you. That you have to sketch the API in a language is not necessarily "code-first", it's just a different language than yaml/json, (go,py,js) without the implementation, just write the same types in example