Temple Health · API Governance Rules

Temple Health API Rules

Spectral linting rules defining API design standards and conventions for Temple Health.

8 Rules error 5 warn 3
View Rules File View on GitHub

Rule Categories

temple

Rules

error
temple-health-fhir-r4-base-url
Server URL must be the canonical Temple Health FHIR R4 endpoint.
$.servers[*].url
error
temple-health-fhir-r4-fhir-version-tag
API version must report FHIR R4 (4.0.1).
$.info.version
warn
temple-health-fhir-r4-fhir-media-type
All FHIR responses must use the application/fhir+json media type.
$.paths[*][*].responses[*].content
warn
temple-health-fhir-r4-summary-title-case
Operation summaries must use Title Case.
$.paths[*][*].summary
error
temple-health-fhir-r4-smart-on-fhir-security
API must declare SMART on FHIR / OAuth 2.0 security.
$.components.securitySchemes
error
temple-health-fhir-r4-smart-authorization-url
Authorization URL must be Temple Health's OAuth 2.0 authorize endpoint.
$.components.securitySchemes.smartOnFhir.flows.authorizationCode.authorizationUrl
error
temple-health-fhir-r4-smart-token-url
Token URL must be Temple Health's OAuth 2.0 token endpoint.
$.components.securitySchemes.smartOnFhir.flows.authorizationCode.tokenUrl
warn
temple-health-fhir-r4-uscdi-resources
API should document core USCDI FHIR resources (Patient, Observation, Condition, Encounter, MedicationRequest, AllergyIntolerance, DocumentReference).
$.paths

Spectral Ruleset

Raw ↑
extends:
- spectral:oas
rules:
  temple-health-fhir-r4-base-url:
    description: Server URL must be the canonical Temple Health FHIR R4 endpoint.
    message: Server URL should match https://epicaccess.templehealth.org/FhirProxyPrd/api/FHIR/R4
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: '^https://epicaccess\.templehealth\.org/FhirProxyPrd/api/FHIR/R4$'

  temple-health-fhir-r4-fhir-version-tag:
    description: API version must report FHIR R4 (4.0.1).
    message: FHIR version must be 4.0.1.
    severity: error
    given: $.info.version
    then:
      function: pattern
      functionOptions:
        match: '^4\.0\.1$'

  temple-health-fhir-r4-fhir-media-type:
    description: All FHIR responses must use the application/fhir+json media type.
    message: Use application/fhir+json for FHIR responses.
    severity: warn
    given: $.paths[*][*].responses[*].content
    then:
      function: truthy
      field: application/fhir+json

  temple-health-fhir-r4-summary-title-case:
    description: Operation summaries must use Title Case.
    message: Operation summary should be Title Case.
    severity: warn
    given: $.paths[*][*].summary
    then:
      function: pattern
      functionOptions:
        match: '^[A-Z][A-Za-z0-9]*(\s[A-Z][A-Za-z0-9]*)*$'

  temple-health-fhir-r4-smart-on-fhir-security:
    description: API must declare SMART on FHIR / OAuth 2.0 security.
    message: smartOnFhir security scheme is required.
    severity: error
    given: $.components.securitySchemes
    then:
      field: smartOnFhir
      function: truthy

  temple-health-fhir-r4-smart-authorization-url:
    description: Authorization URL must be Temple Health's OAuth 2.0 authorize endpoint.
    message: Use https://epicaccess.templehealth.org/FhirProxyPrd/oauth2/authorize as authorizationUrl.
    severity: error
    given: $.components.securitySchemes.smartOnFhir.flows.authorizationCode.authorizationUrl
    then:
      function: pattern
      functionOptions:
        match: '^https://epicaccess\.templehealth\.org/FhirProxyPrd/oauth2/authorize$'

  temple-health-fhir-r4-smart-token-url:
    description: Token URL must be Temple Health's OAuth 2.0 token endpoint.
    message: Use https://epicaccess.templehealth.org/FhirProxyPrd/oauth2/token as tokenUrl.
    severity: error
    given: $.components.securitySchemes.smartOnFhir.flows.authorizationCode.tokenUrl
    then:
      function: pattern
      functionOptions:
        match: '^https://epicaccess\.templehealth\.org/FhirProxyPrd/oauth2/token$'

  temple-health-fhir-r4-uscdi-resources:
    description: API should document core USCDI FHIR resources (Patient, Observation, Condition, Encounter, MedicationRequest, AllergyIntolerance, DocumentReference).
    message: Document the USCDI core resource paths.
    severity: warn
    given: $.paths
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          required:
          - /Patient
          - /Observation
          - /Condition
          - /Encounter
          - /MedicationRequest
          - /AllergyIntolerance
          - /DocumentReference

Work with this as data

Every ruleset here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/temple-health-temple-health-fhir-r4-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.