The OpenAPI specification aims at standardizing the representation of REST based systems in json and yaml formats. A short version of the petstore is below:
{
"swagger": "2.0",
"info": {},
"host": "petstore.swagger.io",
"basePath": "/v2",
"tags": [],
"schemes": [
"http"
],
"paths": {},
"securityDefinitions": {},
"definitions": {},
"externalDocs": {
"description": "Find out more about Swagger",
"url": "http://swagger.io"
}
}
Based on this document, client and server stubs can be generated in different programming languages/frameworks using the OpenAPI codegen project. Is there a computer science theory behind this ? To be more precise, I want to specifically know if there are theoretical concepts behind taking an input, (in this case a json/yaml document) and getting a source code representation in one or more programming languages that represents the initial input ?
generative programming
, (which falls underautomatic programming
), deals withautomatic code generation
. I also found some academic papers that give more insights into the theory and related research :) I can accept your answer if you move it to the appropriate place. $\endgroup$ – SyCode Jun 13 '18 at 16:38