Ready Player Me · API Governance Rules

Ready Player Me API Rules

Spectral linting rules defining API design standards and conventions for Ready Player Me.

7 Rules warn 6 info 1
View Rules File View on GitHub

Rule Categories

rpm

Rules

warn
rpm-info-contact
Ready Player Me OpenAPI specs must declare a contact block.
$.info
warn
rpm-info-description
Ready Player Me OpenAPI specs must declare a non-empty description.
$.info
warn
rpm-app-id-security
Ready Player Me APIs are scoped per application via the X-APP-ID header security scheme.
$.components.securitySchemes
warn
rpm-server-host
Ready Player Me API servers should use the api.readyplayer.me host or a per-application subdomain of readyplayer.me.
$.servers[*].url
warn
rpm-operation-summary-title-case
Ready Player Me operation summaries should use Title Case.
$.paths[*][get,post,put,patch,delete,options,head].summary
warn
rpm-tag-presence
Operations must be tagged for navigation.
$.paths[*][get,post,put,patch,delete].tags
info
rpm-glb-content-type
GLB responses should be served as model/gltf-binary.
$.paths[*][get].responses['200'].content

Spectral Ruleset

Raw ↑
extends: [[spectral:oas, all]]
rules:
  rpm-info-contact:
    description: Ready Player Me OpenAPI specs must declare a contact block.
    severity: warn
    given: $.info
    then:
      field: contact
      function: truthy
  rpm-info-description:
    description: Ready Player Me OpenAPI specs must declare a non-empty description.
    severity: warn
    given: $.info
    then:
      field: description
      function: truthy
  rpm-app-id-security:
    description: Ready Player Me APIs are scoped per application via the X-APP-ID header security scheme.
    severity: warn
    given: $.components.securitySchemes
    then:
      function: truthy
  rpm-server-host:
    description: Ready Player Me API servers should use the api.readyplayer.me host or a per-application
      subdomain of readyplayer.me.
    severity: warn
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: "(api\\.readyplayer\\.me|readyplayer\\.me)"
  rpm-operation-summary-title-case:
    description: Ready Player Me operation summaries should use Title Case.
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,options,head].summary
    then:
      function: pattern
      functionOptions:
        match: "^([A-Z][a-zA-Z0-9]*)( [A-Z][a-zA-Z0-9]*)*( [Aa]| [Aa]n| [Tt]he| [Oo]f| [Ff]or| [Ww]ith)?( [A-Z][a-zA-Z0-9]*)*$"
  rpm-tag-presence:
    description: Operations must be tagged for navigation.
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].tags
    then:
      function: truthy
  rpm-glb-content-type:
    description: GLB responses should be served as model/gltf-binary.
    severity: info
    given: $.paths[*][get].responses['200'].content
    then:
      function: truthy