openapi: 3.2.0 info: title: Apiaddicts Configuration API version: 1.0.0 description: 'Operations tagged Configuration across 2 of this provider''s published API definitions: apigen-springboot-api.yaml, apiaddicts-apigen-openapi.yml. Each path carries the servers of the definition it was published in.' tags: - name: Configuration paths: /configuration/file: post: tags: - Configuration summary: Generate configuration from file operationId: configurationFromFile requestBody: $ref: '#/components/requestBodies/file' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/config' components: schemas: parameter: type: object properties: required: type: boolean description: Flag used to indicate if the parameter is required example: false in: type: string enum: - path - query description: Type of the parameter location, in the path of the mapping or in the query parameters example: path default_value: type: object description: Default value of the parameter, accepts any type example: 23 name: type: string description: Name of the parameter example: pet_id validations: type: array minItems: 0 items: $ref: '#/components/schemas/validation' description: List of validations of the request type: type: string description: Type of the parameter, values accepted are the OpenAPI types example: string format: type: string description: Format of the parameter, values accepted are the OpenAPI formats for the given type example: in64 is_collection: type: boolean description: Flag used to indicate if the parameter is a collection example: false required: - required - in - name - type - is_collection size-validation: type: object required: - type properties: type: type: string enum: - SIZE example: SIZE integer_value_one: type: integer format: int32 description: Minimal size example: 2 integer_value_two: type: integer format: int32 description: Maximal size example: 5 void-validation: type: object required: - type properties: type: type: string enum: - NOT_NULL - EMAIL - NOT_EMPTY - NOT_BLANK - POSITIVE - POSITIVE_OR_ZERO - NEGATIVE - NEGATIVE_OR_ZERO - PAST - PAST_OR_PRESENT - FUTURE - FUTURE_OR_PRESENT example: NOT_NULL digits-validation: type: object required: - type properties: type: type: string enum: - DIGITS example: DIGITS integer_value_one: type: integer format: int32 description: Max number of digits in integer part example: 10 integer_value_two: type: integer format: int32 description: Max number of digits in decimal part example: 20 attribute-column: type: object properties: name: type: string description: Name of the column in the database example: first_name primary_key: type: boolean description: Flag used to indicate if the column is the primary key example: true autogenerated: type: boolean description: Flag used to indicate if the column is autogenerated example: true sequence: type: string description: Name of the sequence used to generate the value, only used if provided and is a primary key autogenerated example: main_seq unique: type: boolean description: Flag used to indicate if the column is unique example: true reference_column: type: string description: Name of the column that this column references, only required when the attribute is a Entity with ComposedID example: main_id required: - primary_key request-body: type: object properties: related_entity: type: string description: Entity related with this request, if not provided asumes that is a nonentity request example: Pet attributes: type: array minItems: 0 items: $ref: '#/components/schemas/body-attribute' description: List of attributes of the request required: - attributes entity: type: object properties: name: type: string description: Name of the entity example: Pet table: type: string description: Name of the table in the databasem, if it's not defined, then the name of the entity transformed to kebab_case example: pets attributes: type: array items: $ref: '#/components/schemas/entity-attribute' description: Attributes of the entity required: - name - attributes controller: type: object properties: entity: type: string description: Name of the entity to with this controler belongs, if not provided asumes that is a nonentity controller example: Pet mapping: type: string description: Base path of the mapping example: /pets endpoints: type: array minItems: 0 items: $ref: '#/components/schemas/endpoint' required: - mapping - endpoints decimal-validation: type: object required: - type properties: type: type: string enum: - DECIMAL_MIN - DECIMAL_MAX example: DECIMAL_MIN decimal_value: type: number format: double example: 5.25 inclusive: type: boolean example: false validation: anyOf: - $ref: '#/components/schemas/void-validation' - $ref: '#/components/schemas/long-validation' - $ref: '#/components/schemas/decimal-validation' - $ref: '#/components/schemas/size-validation' - $ref: '#/components/schemas/digits-validation' - $ref: '#/components/schemas/pattern-validation' attribute-relation: type: object description: Data about the relation of this attribute with other Entity properties: related_entity: type: string description: Name of the other Entity related with the attribute example: Owner intermediate_table: type: string description: Name of the intermediate table in database, only required when define many to many relations example: pets_tags owner: type: boolean description: Flag used to indicate what part of the relation is the owner (who can update the data) example: true columns: type: array minItems: 0 items: $ref: '#/components/schemas/attribute-column' description: Data about the columns in the intermediate table that are related with this Entity table reverse_columns: type: array minItems: 0 items: $ref: '#/components/schemas/attribute-column' description: Data about the columns in the intermediate table that are related with the other Entity table required: - related_entity endpoint: type: object properties: method: type: string enum: - GET - POST - PUT - DELETE description: The http method of the endpoint example: GET mapping: type: string description: Path of the endpoint mapping example: /{id} name: type: string description: Name of the method that implements the controller example: getOwnerById parameters: type: array minItems: 0 items: $ref: '#/components/schemas/parameter' request: $ref: '#/components/schemas/request-body' response: $ref: '#/components/schemas/response-body' related_entity: type: string description: Entity related with this endpoint, if not provided asumes that is a nonentity endpoint example: Pet required: - method - name config: type: object properties: name: type: string description: The name of the project example: my-project description: type: string description: The description of the project example: This is my project group: type: string description: The group for the maven project example: org.domain.examples artifact: type: string description: The artifact for the maven project example: myproject version: type: string description: The version for the maven project example: 1.0.0-SNAPSHOT partial: type: boolean default: false description: Flag to generate all the components or only the models/controllers related example: false entities: type: array minItems: 0 items: $ref: '#/components/schemas/entity' description: Array with the schema of the entities controllers: type: array minItems: 1 items: $ref: '#/components/schemas/controller' description: Array with the schema of the controllers required: - name - group - artifact - version - partial - entities - controllers response-body: type: object properties: is_standard: type: boolean description: Flag used to indicate if is a standard response example: false is_collection: type: boolean description: Flag used to indicate if is a collection response example: false collection_name: type: string description: Name of the collection in the standard response, only required when is collection and standard related_entity: type: string description: Entity related with this response, if not provided asumes that is a nonentity response attributes: type: array minItems: 0 items: $ref: '#/components/schemas/body-attribute' description: List of attributes of the response default_status_code: type: integer format: int32 description: Status code of the response, only if it is not standard entity out resource required: - is_standard - is_collection - attributes body-attribute: type: object properties: name: type: string description: Name of the field in the json example: first_name validations: type: array minItems: 0 items: $ref: '#/components/schemas/validation' description: List of validations of the attribute attributes: type: array minItems: 0 items: $ref: '#/components/schemas/body-attribute' description: List of attributes of the attribute type: type: string description: Type of the attribute, values accepted are the OpenAPI types example: string format: type: string description: Format of the attribute, values accepted are the OpenAPI formats for the given type example: int64 is_collection: type: boolean description: Flag used to indicate if the parameter is a collection example: false related_entity: type: string description: Name of the entity that represents that attribute example: Pet entity_field_name: type: string description: Name of the entity field that represents that attribute, if not given, by default uses the name transformed to snakeCase example: firstName required: - name - type - is_collection entity-attribute: type: object properties: name: type: string description: Name of the attribute in Java example: firstName type: type: string description: 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 example: Pet columns: type: array minItems: 0 items: $ref: '#/components/schemas/attribute-column' description: 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 foreign_columns: type: array minItems: 0 items: $ref: '#/components/schemas/attribute-column' description: Data about the columns related with this attribute that are in other entity table relation: $ref: '#/components/schemas/attribute-relation' validations: type: array minItems: 0 items: $ref: '#/components/schemas/validation' description: Validations to apply to the attribute attributes: type: array items: $ref: '#/components/schemas/entity-attribute' description: Attributes of the attribute, only used when the attribute type is ComposedID is_collection: type: boolean description: Flag used to indicate if the attribute is a collection or a object example: false required: - name - type - columns - foreign_columns - is_collection long-validation: type: object required: - type properties: type: type: string enum: - MIN - MAX example: MIN long_value: type: integer format: int64 example: 20 inclusive: type: boolean example: false pattern-validation: type: object required: - type - string_value properties: type: type: string enum: - PATTERN example: PATTERN string_value: type: string description: Regex pattern example: - ^i*&2@ requestBodies: file: content: multipart/form-data: schema: type: object properties: file: description: file type: string format: binary required: - file x-refined-from: - apigen-springboot-api.yaml - apiaddicts-apigen-openapi.yml