{
    "openapi": "3.0.0",
    "info": {
        "title": "Hexia Image",
        "description": "Hexia microservice to apply transformations to an image",
        "version": "master-801999e9"
    },
    "paths": {
        "/api/v1/blur-faces": {
            "post": {
                "tags": [
                    "Blur"
                ],
                "operationId": "post_app_infrastructure_rest_imagerest_blurfaces",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "Image to blur",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "facesExpected": {
                                        "description": "Are we expecting a face in the image? True by default",
                                        "type": "boolean"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "417": {
                        "description": "When no faces are found in the image",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "When an unknown error occurs",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "BinaryFile"
                    }
                }
            }
        },
        "/api/v1/convert-to/{outputType}": {
            "post": {
                "tags": [
                    "Convert"
                ],
                "operationId": "post_app_infrastructure_rest_imagerest_convert",
                "parameters": [
                    {
                        "name": "outputType",
                        "in": "path",
                        "description": "Type of image/document to convert to. Options are 'png', 'jpg', 'bmp' and 'pdf'. Choose 'same' to maintain type",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "png",
                                "jpg",
                                "bmp",
                                "pdf",
                                "same"
                            ]
                        }
                    },
                    {
                        "name": "options",
                        "in": "query",
                        "description": "Conversion options",
                        "required": false,
                        "schema": {
                            "$ref": "#/components/schemas/ConvertOptions"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "Image or PDF to convert to an image",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "500": {
                        "description": "When an unknown error occurs",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "BinaryFile"
                    }
                }
            }
        },
        "/api/v1/rotate": {
            "post": {
                "tags": [
                    "Transform"
                ],
                "operationId": "post_app_infrastructure_rest_imagerest_rotate",
                "parameters": [
                    {
                        "name": "stripExif",
                        "in": "query",
                        "description": "Strip the EXIF data from the image",
                        "required": false,
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file",
                                    "degrees"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "Image to rotate",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "degrees": {
                                        "description": "Degrees to rotate",
                                        "type": "integer"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "500": {
                        "description": "When an unknown error occurs",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "BinaryFile"
                    }
                }
            }
        },
        "/api/v1/blur-area": {
            "post": {
                "tags": [
                    "Blur"
                ],
                "operationId": "post_app_infrastructure_rest_imagerest_blurarea",
                "parameters": [
                    {
                        "name": "x",
                        "in": "query",
                        "description": "Area x location",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "y",
                        "in": "query",
                        "description": "Area y location",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "width",
                        "in": "query",
                        "description": "Area width",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "height",
                        "in": "query",
                        "description": "Area height",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "Image or PDF to blur",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "500": {
                        "description": "When an unknown error occurs",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "BinaryFile"
                    }
                }
            }
        },
        "/api/v1/blur-bsn": {
            "post": {
                "tags": [
                    "Blur"
                ],
                "operationId": "post_app_infrastructure_rest_imagerest_blurbsn",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "required": [
                                    "file"
                                ],
                                "properties": {
                                    "file": {
                                        "description": "Image to blur",
                                        "type": "string",
                                        "format": "binary"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "417": {
                        "description": "When no BSN is found in the image",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "When an unknown error occurs",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "200": {
                        "description": "BinaryFile"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Error": {
                "properties": {
                    "type": {
                        "type": "string",
                        "example": "SomethingNotFound"
                    },
                    "message": {
                        "type": "string",
                        "example": "The person could not be found"
                    },
                    "code": {
                        "type": "string",
                        "example": "123-3232189fh34y83-12323"
                    }
                },
                "type": "object"
            },
            "ConvertOptions": {
                "properties": {
                    "width": {
                        "description": "The width of the image",
                        "type": "integer",
                        "nullable": true
                    },
                    "height": {
                        "description": "The height of the image",
                        "type": "integer",
                        "nullable": true
                    },
                    "quality": {
                        "description": "The quality of the image for 0 to 100",
                        "type": "integer",
                        "nullable": true
                    },
                    "stripExif": {
                        "description": "Whether to strip EXIF data from the image",
                        "type": "boolean",
                        "default": false
                    },
                    "keepAspectRatio": {
                        "description": "Whether to keep the aspect ratio of the image if both width and height are set",
                        "type": "boolean",
                        "default": false
                    },
                    "rotationDegrees": {
                        "description": "The degrees to rotate the image",
                        "type": "integer",
                        "nullable": true
                    },
                    "onlyScaleUp": {
                        "description": "Whether to only allow the image to scale up",
                        "type": "boolean",
                        "default": false
                    },
                    "onlyScaleDown": {
                        "description": "Whether to only allow the image to scale down",
                        "type": "boolean",
                        "default": false
                    },
                    "outputType": {
                        "type": "string",
                        "readOnly": true,
                        "nullable": true
                    }
                },
                "type": "object"
            }
        }
    },
    "tags": [
        {
            "name": "Blur"
        },
        {
            "name": "Convert"
        },
        {
            "name": "Transform"
        }
    ]
}