Skip to content
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

Closed
wants to merge 3 commits into from
Closed

OpenAPI Spec #142

wants to merge 3 commits into from

Conversation

qhanson55
Copy link
Contributor

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

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Copy link

Coverage Report (Frontend)

Totals Coverage
Statements: 28.69% ( 1500 / 5229 )
Methods: 24.66% ( 253 / 1026 )
Lines: 32.99% ( 927 / 2810 )
Branches: 22.97% ( 320 / 1393 )

Copy link

Coverage Report (Application)

Totals Coverage
Statements: 46.05% ( 945 / 2052 )
Methods: 35.62% ( 135 / 379 )
Lines: 56.71% ( 617 / 1088 )
Branches: 32.99% ( 193 / 585 )

Copy link

codeclimate bot commented Aug 29, 2024

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
Copy link
Contributor

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':
Copy link
Contributor

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>
Copy link
Contributor

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:
Copy link
Contributor

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" } ]

@kyle1morel kyle1morel closed this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants