Tenet Healthcare · API Governance Rules

Tenet Healthcare API Rules

Spectral linting rules defining API design standards and conventions for Tenet Healthcare.

10 Rules error 2 warn 5 info 3
View Rules File View on GitHub

Rule Categories

tenet

Rules

warn
tenet-smart-on-fhir-required
All Tenet FHIR API operations must use SMART on FHIR OAuth 2.0
$.paths[*][get,post,put,patch,delete]
error
tenet-operation-id-required
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
tenet-operation-id-camel-case
OperationIds must use camelCase
$.paths[*][get,post,put,patch,delete].operationId
warn
tenet-summary-title-case
Operation summaries must use Title Case
$.paths[*][get,post,put,patch,delete].summary
info
tenet-fhir-content-type
FHIR API responses should use application/fhir+json content type
$.paths[*][get].responses[200].content
warn
tenet-patient-id-param
Patient resource paths should define the id path parameter
$.paths[*~'/Patient/{id}'][get].parameters
info
tenet-fhir-bundle-response
Search operations should return FHIR Bundle resources
$.paths[*][get].responses[200].content.application/fhir+json.schema
error
tenet-server-urls-required
API spec must define server URLs
$
info
tenet-fhir-version-info
FHIR API specs should declare the FHIR version
$.info
warn
tenet-unauthorized-response
FHIR operations must define 401 Unauthorized response
$.paths[*][get,post,put,patch,delete].responses

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:

  # FHIR APIs require SMART on FHIR security
  tenet-smart-on-fhir-required:
    description: All Tenet FHIR API operations must use SMART on FHIR OAuth 2.0
    message: "Operation '{{operationId}}' should reference SMART on FHIR security scheme"
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: security
      function: truthy

  # Enforce operation IDs
  tenet-operation-id-required:
    description: All operations must have an operationId
    message: "Operation is missing operationId"
    severity: error
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: operationId
      function: truthy

  # Enforce camelCase operation IDs
  tenet-operation-id-camel-case:
    description: OperationIds must use camelCase
    message: "operationId '{{value}}' should use camelCase"
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]+$"

  # Enforce Title Case summaries
  tenet-summary-title-case:
    description: Operation summaries must use Title Case
    message: "Summary '{{value}}' should use Title Case"
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete].summary"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][a-zA-Z0-9 ]+$"

  # FHIR responses should use application/fhir+json
  tenet-fhir-content-type:
    description: FHIR API responses should use application/fhir+json content type
    message: "FHIR response should use application/fhir+json content type"
    severity: info
    given: "$.paths[*][get].responses[200].content"
    then:
      field: "application/fhir+json"
      function: truthy

  # Patient paths should have ID parameter
  tenet-patient-id-param:
    description: Patient resource paths should define the id path parameter
    message: "Patient path should define the id parameter"
    severity: warn
    given: "$.paths[*~'/Patient/{id}'][get].parameters"
    then:
      function: truthy

  # FHIR Bundle responses for search results
  tenet-fhir-bundle-response:
    description: Search operations should return FHIR Bundle resources
    message: "Search operation should return FHIR Bundle"
    severity: info
    given: "$.paths[*][get].responses[200].content.application/fhir+json.schema"
    then:
      function: truthy

  # Server URLs required
  tenet-server-urls-required:
    description: API spec must define server URLs
    message: "API spec is missing server definitions"
    severity: error
    given: "$"
    then:
      field: servers
      function: truthy

  # FHIR version documentation
  tenet-fhir-version-info:
    description: FHIR API specs should declare the FHIR version
    message: "API spec should document FHIR version in info.version or description"
    severity: info
    given: "$.info"
    then:
      field: version
      function: truthy

  # 401 response required
  tenet-unauthorized-response:
    description: FHIR operations must define 401 Unauthorized response
    message: "Operation should define 401 Unauthorized response for SMART on FHIR failures"
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete].responses"
    then:
      field: "401"
      function: truthy

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/tenet-healthcare-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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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