Generates application code based on your project's mapping rules and schema transformations
Generates application code based on your project's mapping rules and schema transformations
Body Required
-
MongoDB collections to include in generated code
-
Whether to include support files, if applicable for the selected language and framework
-
Values are
JAVA
,CSHARP
,JAVASCRIPT
,JSON
, orPYTHON
. -
Values are
POJO
,POCO
,SPRING_DATA
,PERSISTENCE_LAYER
,MONGOOSE_SCHEMAS
,NODE
,MONGODB_JSON_SCHEMA
,STANDARD_JSON_SCHEMA
,JSON_EXAMPLE_SCHEMA
, orPYTHON_TYPED_DICT_CLASSES
.
POST /project/{projectId}/codegen/generate
curl \ --request POST 'http://127.0.0.1:8278/api/v1/project/{projectId}/codegen/generate' \ --header "Content-Type: application/json" \ --data '{"collections":["string"],"includeSupportFiles":true,"language":"JAVA","framework":"POJO"}'
Request examples
{ "collections": [ "string" ], "includeSupportFiles": true, "language": "JAVA", "framework": "POJO" }
Response examples (200)
{ "language": "JAVA", "framework": "POJO", "files": [ { "name": "string", "filetype": "ENTITY", "code": "string" } ] }