-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenAPI Spec #142
OpenAPI Spec #142
Conversation
908f610
to
907f882
Compare
Code Climate has analyzed commit 42b3303 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 40.3% (0.6% change). View more on Code Climate. |
$ref: '#/components/responses/Error' | ||
/document/: | ||
put: | ||
summary: Create or update a document |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this api can only create the document, there is no update. Delete and re-upload is the only way.
type: array | ||
items: | ||
$ref: '#/components/schemas/DB-Document' | ||
'401': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing 403 and 422.
All routes that use 'router.use(requireSomeAuth)' will throw 403 and routes that use a validator will throw 422. Please include these for all the routes.
getDocHTML: (version: string) => `<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Common Object Management Service API - Documentation ${version}</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PCNS
description: A list of documents for the specified activity | ||
content: | ||
application/json: | ||
schema: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return object is slightly different createdAt and createdBy is also being returned.
[ { "documentId": "aaeecdfd-79cd-4a7c-a772-d906637bcb63", "activityId": "F2172B78", "filename": "dsadsadsa_4c080e3c_ec07a13f.docx", "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "filesize": 11855, "createdAt": "2024-08-30T16:00:21.199Z", "createdBy": "7255f440-1f4a-431b-9548-b7ce2e9e6fb4", "createdByFullName": "Babu, Sanjay WLRS:EX" } ]
Description
Added the OpenAPI spec yaml file and code for creating v1/docs endpoints, and two endpoints for creating a openapi-spec in json and yaml
So that people can interact/understand the API
PADS-41
Types of changes
Documentation (non-breaking change with enhancements to documentation)
Checklist
Further comments