Skip to content

Commit

Permalink
knollfear/bcda-553 Swagger doc improvements (#86)
Browse files Browse the repository at this point in the history
* Minor changes to swagger docs to make it clear how to use the authorize function and make exploring the API a little easier.

* changed document title to BCDA documentation instead of swagger ui
  • Loading branch information
knollfear authored Dec 4, 2018
1 parent d0c41ed commit a3147ab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
20 changes: 9 additions & 11 deletions bcda/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
The Beneficiary Claims Data API (BCDA) allows downloading of claims data in accordance with the FHIR Bulk Data Export specification.
Terms Of Service:
If you have a token you can use this page to explore the API. To do this click the green "Authorize" button below and enter "Bearer {YOUR_TOKEN}"
in the "Value" field and click authorize. Until you click logout your token will be presented with every request made. To make requests click on the
"Try it out" button for the desired endpoint.
there are no TOS at this moment, use at your own risk we take no responsibility
Schemes: http, https
Host: localhost
BasePath: /api/v1
Version: 1.0.0
License: https://github.com/CMSgov/bcda-app/blob/master/LICENSE.md
Contact: [email protected]
Expand Down Expand Up @@ -57,7 +55,7 @@ import (
)

/*
swagger:route GET /ExplanationOfBenefit/$export bulkData bulkRequest
swagger:route GET /api/v1/ExplanationOfBenefit/$export bulkData bulkRequest
Start explanation of benefit export
Expand All @@ -66,7 +64,7 @@ import (
Produces:
- application/fhir+json
Schemes: http, https
Schemes: [http, https]
Security:
api_key
Expand Down Expand Up @@ -183,7 +181,7 @@ func bulkRequest(w http.ResponseWriter, r *http.Request) {
}

/*
swagger:route GET /jobs/{jobId} bulkData jobStatus
swagger:route GET /api/v1/jobs/{jobId} bulkData jobStatus
Get job status
Expand Down Expand Up @@ -308,11 +306,11 @@ func jobStatus(w http.ResponseWriter, r *http.Request) {
}

/*
swagger:route GET /data/{jobId}/{filename}.ndjson bulkData serveData
swagger:route GET /data/{jobId}/{filename} bulkData serveData
Get data file
Returns the NDJSON file of data generated by an export job.
Returns the NDJSON file of data generated by an export job. Will be in the format <UUID>.ndjson. Get the full value from the job status response
Produces:
- application/fhir+json
Expand Down Expand Up @@ -413,7 +411,7 @@ func blueButtonMetadata(w http.ResponseWriter, r *http.Request) {
}

/*
swagger:route GET /metadata metadata metadata
swagger:route GET /api/v1/metadata metadata metadata
Get metadata
Expand Down
5 changes: 4 additions & 1 deletion bcda/models/SwaggerStructs.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ type FileParam struct {
// swagger:parameters bulkRequest
type BulkRequestHeaders struct {
// required: true
// pattern: application/fhir\+json
// in: header
// enum: [application/fhir+json]
Accept string
// required: true
// pattern: respond-async
// in: header
// enum: [respond-async]
Prefer string
}
2 changes: 1 addition & 1 deletion bcda/swaggerui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<title>BCDA Documentation</title>
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
Expand Down

0 comments on commit a3147ab

Please sign in to comment.