Just a bit of clarification: Pyotr does not generate any code, it uses the spec as configuration to construct the necessary routes at the app initialization, as well as to validate requests and responses.
In a way it feels kinda lispy (in a good way) to me, data is code, small DSL for working more efficiently with specific domain.