Skip to content

Add swagger doc#70

Merged
andrewmarklloyd merged 2 commits into
SoftwareEngineeringDaily:developfrom
abdulbasitkay:develop
Apr 9, 2018
Merged

Add swagger doc#70
andrewmarklloyd merged 2 commits into
SoftwareEngineeringDaily:developfrom
abdulbasitkay:develop

Conversation

@abdulbasitkay
Copy link
Copy Markdown
Contributor

My attempt at #59, hope this works

@andrewmarklloyd
Copy link
Copy Markdown
Contributor

Looking good so far @abdulbasitkay! I started a review and I have a few notes here:

  • We've disabled authentication for now, but I think it is a good idea to keep the documentation so nice work.
  • I don't think we need the server/docs/parameters.yaml file since none of the endpoints support it. I assume this was a copy over from the other API project?
  • I would add docs for the server/routes/event.route.js as well. That route doesn't have quite the same validation yet but after issue 57 it should

@abdulbasitkay
Copy link
Copy Markdown
Contributor Author

Thanks for the feedback @andrewmarklloyd,
I didn't get your last point. I've already added some docs to server/routes/event.route.js or were you referring to server/routes/error.route.js that's mentioned in issue #57?

@andrewmarklloyd
Copy link
Copy Markdown
Contributor

Sorry about that, you're right I meant error.route.js

@andrewmarklloyd
Copy link
Copy Markdown
Contributor

andrewmarklloyd commented Apr 9, 2018

Let's merge this in and we can add a new issue to add docs for error.route.js

example: 1522767185
eventData:
type: object
description: raw data of the event being streamed
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The eventData maps to a specific eventType's required keys. For example the playEpisode eventType eventData has 3 fields: episodeName, minutesPlayed, and minutesRemaining. I would add an example, like:

example: {
    episodeName: "Ethereum Governance with Hudson Jameson",
    minutesPlayed: 1622.53,
    minutesRemaining: 117.62
}

@andrewmarklloyd andrewmarklloyd merged commit cb51b8c into SoftwareEngineeringDaily:develop Apr 9, 2018
@andrewmarklloyd andrewmarklloyd mentioned this pull request Apr 9, 2018
2 tasks
@andrewmarklloyd
Copy link
Copy Markdown
Contributor

Created a new issue #73

andrewmarklloyd added a commit that referenced this pull request Apr 21, 2018
* Add script to build coverage badge for README
* Use Webtask API to update coverage badge
* Update README.md
* Add a field to identify the environment (Test or Prod) (#67)
* Add unit tests
* Store errors in DB with each field separately. Allow error types authorization and other for now. Build InfluxDB fields using the param-validation schema (#71)
* Add swagger doc (#70)
* Update moment dependency to 2.19.3 (#75)
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.

2 participants