diff --git a/README.md b/README.md index 461bf52..ea4ea57 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,19 @@ gradle run ### Run tests ```sh -gradle test +gradle test # only run tests +gradle testCodeCoverageReport # run tests & generate coverage ``` +See test results +```sh +app/build/reports/tests/test/index.html # general +app/build/reports/jacoco/testCodeCoverageReport/html/index.html # coverage +``` + + + + ### Format You need to have `clang-format` installed. diff --git a/docs/spec.openapi.yml b/docs/spec.openapi.yml index 79e2776..15cff8e 100644 --- a/docs/spec.openapi.yml +++ b/docs/spec.openapi.yml @@ -165,12 +165,29 @@ paths: schema: $ref: '#/components/schemas/ReqFileUpload' responses: - "200": + "201": description: File is being uploaded. You can check it's state later with the `/file_check` request. content: Object: schema: $ref: '#/components/schemas/ResFileNew' + "400": + description: Failed field validation. + content: + Object: + schema: + allOf: + - $ref: '#/components/schemas/ResStatus' + - type: object + properties: + msg: + example: '"fileContent: must not be null","fileName: must not be null"' + "413": + description: Bad request. File is too large. + content: + Object: + schema: + $ref: '#/components/schemas/ResStatus' 'default': description: An error occurred. Returns error code and message. See possible responses at [Metadata API Spec endpoint `POST /files`](https://github.com/hawks-atlanta/metadata-scala/blob/main/docs/spec.openapi.yaml) content: