---
title: "Generate configuration from file"
method: POST
path: "/configuration/file"
tags: ["Configuration"]
---

# Generate configuration from file

`POST /configuration/file`

## Response `200`

OK

- Config
  - `name` string, required — The name of the project
  - `description` string — The description of the project
  - `group` string, required — The group for the maven project
  - `artifact` string, required — The artifact for the maven project
  - `version` string, required — The version for the maven project
  - `partial` boolean, required — Flag to generate all the components or only the models/controllers related
  - `entities` Entity[], required — Array with the schema of the entities
    - `name` string, required — Name of the entity
    - `table` string — Name of the table in the databasem, if it's not defined, then the name of the entity transformed to kebab_case
    - `attributes` EntityAttribute[], required — Attributes of the entity
      - `name` string, required — Name of the attribute in Java
      - `type` string, required — Type of the attribute in Java, can be a basic type (String, Boolean, Double, Float, Integer, Long, LocalDate, OffsetDateTime) a ComposedID or an Entity name
      - `columns` AttributeColumn[], required — Data about the columns related with this attribute that are in the entity table, if not provided the name of the column is the name of the property transformed to kebab_case
        - `name` string — Name of the column in the database
        - `primary_key` boolean, required — Flag used to indicate if the column is the primary key
        - `autogenerated` boolean — Flag used to indicate if the column is autogenerated
        - `sequence` string — Name of the sequence used to generate the value, only used if provided and is a primary key autogenerated
        - `unique` boolean — Flag used to indicate if the column is unique
        - `reference_column` string — Name of the column that this column references, only required when the attribute is a Entity with ComposedID
      - `foreign_columns` AttributeColumn[], required — Data about the columns related with this attribute that are in other entity table
        - `name` string — Name of the column in the database
        - `primary_key` boolean, required — Flag used to indicate if the column is the primary key
        - `autogenerated` boolean — Flag used to indicate if the column is autogenerated
        - `sequence` string — Name of the sequence used to generate the value, only used if provided and is a primary key autogenerated
        - `unique` boolean — Flag used to indicate if the column is unique
        - `reference_column` string — Name of the column that this column references, only required when the attribute is a Entity with ComposedID
      - `relation` AttributeRelation — Data about the relation of this attribute with other Entity
        - `related_entity` string, required — Name of the other Entity related with the attribute
        - `intermediate_table` string — Name of the intermediate table in database, only required when define many to many relations
        - `owner` boolean — Flag used to indicate what part of the relation is the owner (who can update the data)
        - `columns` AttributeColumn[] — Data about the columns in the intermediate table that are related with this Entity table
          - `name` string — Name of the column in the database
          - `primary_key` boolean, required — Flag used to indicate if the column is the primary key
          - `autogenerated` boolean — Flag used to indicate if the column is autogenerated
          - `sequence` string — Name of the sequence used to generate the value, only used if provided and is a primary key autogenerated
          - `unique` boolean — Flag used to indicate if the column is unique
          - `reference_column` string — Name of the column that this column references, only required when the attribute is a Entity with ComposedID
        - `reverse_columns` AttributeColumn[] — Data about the columns in the intermediate table that are related with the other Entity table
          - `name` string — Name of the column in the database
          - `primary_key` boolean, required — Flag used to indicate if the column is the primary key
          - `autogenerated` boolean — Flag used to indicate if the column is autogenerated
          - `sequence` string — Name of the sequence used to generate the value, only used if provided and is a primary key autogenerated
          - `unique` boolean — Flag used to indicate if the column is unique
          - `reference_column` string — Name of the column that this column references, only required when the attribute is a Entity with ComposedID
      - `validations` Validation[] — Validations to apply to the attribute
        - union
          - VoidValidation
            - `type` 'NOT_NULL' | 'EMAIL' | 'NOT_EMPTY' | 'NOT_BLANK' | 'POSITIVE' | 'POSITIVE_OR_ZERO' | 'NEGATIVE' | 'NEGATIVE_OR_ZERO' | 'PAST' | 'PAST_OR_PRESENT' | 'FUTURE' | 'FUTURE_OR_PRESENT', required
          - LongValidation
            - `type` 'MIN' | 'MAX', required
            - `long_value` integer
            - `inclusive` boolean
          - DecimalValidation
            - `type` 'DECIMAL_MIN' | 'DECIMAL_MAX', required
            - `decimal_value` number, double
            - `inclusive` boolean
          - SizeValidation
            - `type` 'SIZE', required
            - `integer_value_one` integer — Minimal size
            - `integer_value_two` integer — Maximal size
          - DigitsValidation
            - `type` 'DIGITS', required
            - `integer_value_one` integer — Max number of digits in integer part
            - `integer_value_two` integer — Max number of digits in decimal part
          - PatternValidation
            - `type` 'PATTERN', required
            - `string_value` string, required — Regex pattern
      - `attributes` EntityAttribute[] — Attributes of the attribute, only used when the attribute type is ComposedID
      - `is_collection` boolean, required — Flag used to indicate if the attribute is a collection or a object
  - `controllers` Controller[], required — Array with the schema of the controllers
    - `entity` string — Name of the entity to with this controler belongs, if not provided asumes that is a nonentity controller
    - `mapping` string, required — Base path of the mapping
    - `endpoints` Endpoint[], required
      - `method` 'GET' | 'POST' | 'PUT' | 'DELETE', required — The http method of the endpoint
      - `mapping` string — Path of the endpoint mapping
      - `name` string, required — Name of the method that implements the controller
      - `parameters` Parameter[]
        - `required` boolean, required — Flag used to indicate if the parameter is required
        - `in` 'path' | 'query', required — Type of the parameter location, in the path of the mapping or in the query parameters
        - `default_value` object — Default value of the parameter, accepts any type
        - `name` string, required — Name of the parameter
        - `validations` Validation[] — List of validations of the request
          - union
            - VoidValidation
              - …
            - LongValidation
              - …
            - DecimalValidation
              - …
            - SizeValidation
              - …
            - DigitsValidation
              - …
            - PatternValidation
              - …
        - `type` string, required — Type of the parameter, values accepted are the OpenAPI types
        - `format` string — Format of the parameter, values accepted are the OpenAPI formats for the given type
        - `is_collection` boolean, required — Flag used to indicate if the parameter is a collection
      - `request` RequestBody
        - `related_entity` string — Entity related with this request, if not provided asumes that is a nonentity request
        - `attributes` BodyAttribute[], required — List of attributes of the request
          - `name` string, required — Name of the field in the json
          - `validations` Validation[] — List of validations of the attribute
            - union
              - …
          - `attributes` BodyAttribute[] — List of attributes of the attribute
          - `type` string, required — Type of the attribute, values accepted are the OpenAPI types
          - `format` string — Format of the attribute, values accepted are the OpenAPI formats for the given type
          - `is_collection` boolean, required — Flag used to indicate if the parameter is a collection
          - `related_entity` string — Name of the entity that represents that attribute
          - `entity_field_name` string — Name of the entity field that represents that attribute, if not given, by default uses the name transformed to snakeCase
      - `response` ResponseBody
        - `is_standard` boolean, required — Flag used to indicate if is a standard response
        - `is_collection` boolean, required — Flag used to indicate if is a collection response
        - `collection_name` string — Name of the collection in the standard response, only required when is collection and standard
        - `related_entity` string — Entity related with this response, if not provided asumes that is a nonentity response
        - `attributes` BodyAttribute[], required — List of attributes of the response
          - `name` string, required — Name of the field in the json
          - `validations` Validation[] — List of validations of the attribute
            - union
              - …
          - `attributes` BodyAttribute[] — List of attributes of the attribute
          - `type` string, required — Type of the attribute, values accepted are the OpenAPI types
          - `format` string — Format of the attribute, values accepted are the OpenAPI formats for the given type
          - `is_collection` boolean, required — Flag used to indicate if the parameter is a collection
          - `related_entity` string — Name of the entity that represents that attribute
          - `entity_field_name` string — Name of the entity field that represents that attribute, if not given, by default uses the name transformed to snakeCase
        - `default_status_code` integer — Status code of the response, only if it is not standard entity out resource
      - `related_entity` string — Entity related with this endpoint, if not provided asumes that is a nonentity endpoint

---

[API](https://skmtc.dev/apiaddicts/apis/apigen-api.md) · [All operations](https://skmtc.dev/apiaddicts/apis/apigen-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apiaddicts/apigen-api/revisions/96b0e851e424/schema)
