Skip to content

Instantly share code, notes, and snippets.

@nidhi0710
Created August 13, 2023 17:01
Show Gist options
  • Save nidhi0710/f3266f9d9bc927255d3eb6728862540c to your computer and use it in GitHub Desktop.
Save nidhi0710/f3266f9d9bc927255d3eb6728862540c to your computer and use it in GitHub Desktop.
OpenAPI Sample Config for Healthcare API - API Gateway Integration
# sample-config.yaml
swagger: '2.0'
info:
title: API_ID description
description: Sample API on API Gateway with a Google Cloud Healthcare API backend
version: 1.0.0
schemes:
- https
produces:
- application/json
x-google-allow: all
securityDefinitions:
Bearer:
type: apiKey
name: Authorization
in: header
description: >-
Enter the token with the `Bearer: ` prefix, e.g. "Bearer abcde12345".
paths:
/getPateints:
get:
summary: Get all the patients
operationId: getPatients
security:
- Bearer: [] # <-- use the same name here
x-google-backend:
disable_auth: true
address: https://healthcare.googleapis.com/v1/projects/<PROJECT-ID>/locations/<LOCATION>/datasets/<DATASET>/fhirStores/<FHIR-STORE-ID>/fhir/Patient/
responses:
'200':
description: A successful response
schema:
type: string
/Patient/{id}:
get:
summary: Get single patient
operationId: getPatient
parameters:
- in: path
name: id
type: string
required: true
description: ID of the patient to get
security:
- Bearer: [] # <-- use the same name here
x-google-backend:
disable_auth: true
path_translation: APPEND_PATH_TO_ADDRESS
address: https://healthcare.googleapis.com/v1/projects/<PROJECT-ID>/locations/<LOCATION>/datasets/<DATASET>/fhirStores/<FHIR-STORE-ID>/fhir/
responses:
'200':
description: A successful response
schema:
type: string
/getPateint:
get:
summary: Get single patient based on identifier
operationId: getPatient1
parameters:
- in: query
name: identifier
type: string
description: Get patient details based on identifier.
- in: query
name: name
type: string
description: Get patient details based on name.
security:
- Bearer: [] # <-- use the same name here
x-google-backend:
disable_auth: true
address: https://healthcare.googleapis.com/v1/projects/<PROJECT-ID>/locations/<LOCATION>/datasets/<DATASET>/fhirStores/<FHIR-STORE-ID>/fhir/Patient/
responses:
'200':
description: A successful response
schema:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment