Skip to content

Instantly share code, notes, and snippets.

@DamianSuess
Last active July 25, 2022 14:51
Show Gist options
  • Select an option

  • Save DamianSuess/bab2bad87cde15931911fc4feb5ff918 to your computer and use it in GitHub Desktop.

Select an option

Save DamianSuess/bab2bad87cde15931911fc4feb5ff918 to your computer and use it in GitHub Desktop.
Sample RESTful API Documentation Guidelines

TITLE - Web API vX.Y(.Z)

Introduction

Lorem ipsum dolor sit amet, consectetur adipiscing elit

Table of Contents

Prepration (OPTIONAL)

Lorem ipsum dolor sit amet, consectetur adipiscing elit

HTTP Status Code

HTTP status code summary

  • 200 - OK.
  • 400 - Bad request.
  • 401 - Unauthorized.
  • 404 - Not found.

Endpoints

SECTION NAME (User Endpoints)

ENDPOINT NAME (User - Registration)

Lorem ipsum description of the endpoint.

  • URL: /api/vXX/ENDPOINT
  • Method: GET, POST, PUT, DELETE
  • Body: (optional) ObjectType

Parameters:

Parameter Type Description
Param1 string What the parameter does
Param2 int (Optional) What the optional param does.

Responses:

Code Name Payload
200 OK Object or DataType
201 Created Object or DataType
202 Accepted
401 Unauthorized ResponseError
403 Forbidden
404 Not Found
409 Conflict
422 Unprocessable Entry { message = 'Invalid Email' }

SignalR:

  • FirstEvent
  • SecondEvent

Models

ModelNameHere

Lorem ipsum description about it.

Property Type Permissions Description
PropertyName DataType get, set Details about parameter

SignalR Events

All SignalR events must end with the name, Event.

Id Event Name Object Type Description
1 GenericEvent ObjectName Basic event description.
600 Section2NameEvent ObjectName Group 2 section event description.
650 Section3NameEvent ObjectName Group 3 section event description.
900 ErrorNameEvent ObjectName Error event description.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment