Skip to content

Commit

Permalink
Release 0.1.2 (#39)
Browse files Browse the repository at this point in the history
* Rename DateAnnotation.dateFormat to .format

* Remove Note.filename

* Add responses/NotFound.yaml and returned it for note not found

* Add BadRequest.yaml and Unauthorized.yaml

* Most standard reponses of the data node return JSON object

* Surround reponse code by single quotes

* Standard reponse of /health now return JSON object

* Bump to version 0.1.2
  • Loading branch information
tschaffter authored Oct 15, 2020
1 parent 38d2198 commit 81cb1f7
Show file tree
Hide file tree
Showing 18 changed files with 58 additions and 38 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ order.

| API | Type | Version |
|---|---|---|
| [Data Node](/openapi/data-node) | Data Node | 0.1.1 |
| [Date Annotator](/openapi/date-annotator) | NLP Tool | 0.1.1 |
| [Person Name Annotator](/openapi/person-name-annotator) | NLP Tool | 0.1.1 |
| [Physical Address Annotator](/openapi/physical-address-annotator) | NLP Tool | 0.1.1 |
| [Data Node](/openapi/data-node) | Data Node | 0.1.2 |
| [Date Annotator](/openapi/date-annotator) | NLP Tool | 0.1.2 |
| [Person Name Annotator](/openapi/person-name-annotator) | NLP Tool | 0.1.2 |
| [Physical Address Annotator](/openapi/physical-address-annotator) | NLP Tool | 0.1.2 |

## Web services

Expand Down
5 changes: 5 additions & 0 deletions openapi/commons/components/responses/BadRequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Invalid request
content:
application/json:
schema:
$ref: ../schemas/Error.yaml
5 changes: 5 additions & 0 deletions openapi/commons/components/responses/NotFound.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: The specified resource was not found
content:
application/json:
schema:
$ref: ../schemas/Error.yaml
5 changes: 5 additions & 0 deletions openapi/commons/components/responses/Unauthorized.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Unauthorized
content:
application/json:
schema:
$ref: ../schemas/Error.yaml
2 changes: 1 addition & 1 deletion openapi/commons/components/schemas/DateAnnotation.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type: object
description: A date annotation in a text
properties:
dateFormat:
format:
description: Date format (ISO 8601)
type: string
allOf:
Expand Down
9 changes: 9 additions & 0 deletions openapi/commons/components/schemas/Error.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
8 changes: 2 additions & 6 deletions openapi/commons/components/schemas/Note.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ properties:
text:
description: The content of the note
type: string
example: October 3, Ms Chloe Price met with...
example: On March 11, Ms Chloe Price met with her family.
patientPublicId:
readOnly: true
# readOnly: true
allOf:
- $ref: PatientPublicId.yaml
filename:
description: The filename of the source note
type: string
example: 260-01.xml
type:
description: The note type
type: string
Expand Down
4 changes: 2 additions & 2 deletions openapi/commons/paths/health.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ get:
schema:
$ref: ../components/schemas/Health.yaml
'403':
description: Forbidden
$ref: ../components/responses/Unauthorized.yaml
'404':
description: Note not found
$ref: ../components/responses/NotFound.yaml
2 changes: 1 addition & 1 deletion openapi/data-node/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.2
info:
version: 0.1.1
version: 0.1.2
title: NLP Sandbox Data Node API
contact:
name: The NLP Sandbox Team
Expand Down
14 changes: 7 additions & 7 deletions openapi/data-node/paths/annotations/dates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ get:
default: 10
minimum: 10
responses:
"200":
'200':
content:
application/json:
schema:
type: object
properties:
items:
type: array
$ref: '../../../commons/components/schemas/DateAnnotation.yaml'
$ref: ../../../commons/components/schemas/DateAnnotation.yaml
allOf:
- $ref: '../../../commons/components/schemas/PageResponse.yaml'
- $ref: ../../../commons/components/schemas/PageResponse.yaml
description: Success
"403":
description: Forbidden
"404":
description: Date not found
'403':
$ref: ../../../commons/components/responses/Unauthorized.yaml
'404':
$ref: ../../../commons/components/responses/NotFound.yaml
14 changes: 7 additions & 7 deletions openapi/data-node/paths/notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ get:
default: 10
minimum: 10
responses:
"200":
'200':
content:
application/json:
schema:
type: object
properties:
items:
type: array
$ref: '../../commons/components/schemas/Note.yaml'
$ref: ../../commons/components/schemas/Note.yaml
allOf:
- $ref: '../../commons/components/schemas/PageResponse.yaml'
- $ref: ../../commons/components/schemas/PageResponse.yaml
description: Success
"403":
description: Forbidden
"404":
description: Note not found
'403':
$ref: ../../commons/components/responses/Unauthorized.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml

8 changes: 4 additions & 4 deletions openapi/data-node/paths/notes@{id}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ get:
schema:
$ref: ../../commons/components/schemas/Note.yaml
'403':
description: Forbidden
$ref: ../../commons/components/responses/Unauthorized.yaml
'404':
description: Note not found
$ref: ../../commons/components/responses/NotFound.yaml
put:
tags:
- Note
Expand All @@ -42,9 +42,9 @@ put:
'200':
description: OK
'400':
description: Invalid note supplied
$ref: ../../commons/components/responses/BadRequest.yaml
'404':
description: Note not found
$ref: ../../commons/components/responses/NotFound.yaml
requestBody:
content:
application/json:
Expand Down
2 changes: 1 addition & 1 deletion openapi/date-annotator/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.2
info:
version: 0.1.1
version: 0.1.2
title: NLP Sandbox Date Annotator API
contact:
name: The NLP Sandbox Team
Expand Down
2 changes: 1 addition & 1 deletion openapi/date-annotator/paths/dates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ get:
items:
$ref: ../../commons/components/schemas/DateAnnotation.yaml
'403':
description: Forbidden
$ref: ../../commons/components/responses/Unauthorized.yaml
requestBody:
content:
application/json:
Expand Down
2 changes: 1 addition & 1 deletion openapi/person-name-annotator/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.2
info:
version: 0.1.1
version: 0.1.2
title: NLP Sandbox Person Name Annotator API
contact:
name: The NLP Sandbox Team
Expand Down
2 changes: 1 addition & 1 deletion openapi/physical-address-annotator/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.2
info:
version: 0.1.1
version: 0.1.2
title: NLP Sandbox Physical Address Annotator API
contact:
name: The NLP Sandbox Team
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nlp-sandbox-schemas",
"version": "0.1.1",
"version": "0.1.2",
"license": "Apache-2.0",
"repository": "github:Sage-Bionetworks/nlp-sandbox-schemas",
"devDependencies": {
Expand Down

0 comments on commit 81cb1f7

Please sign in to comment.