EvolutionaryScale · API Governance Rules

EvolutionaryScale API Rules

Spectral linting rules defining API design standards and conventions for EvolutionaryScale.

7 Rules error 3 warn 4
View Rules File View on GitHub

Rule Categories

evolutionaryscale

Rules

error
evolutionaryscale-info-contact
Every Forge OpenAPI must declare a contact pointing at forge.evolutionaryscale.ai.
$.info.contact
error
evolutionaryscale-server-https
Forge servers must use HTTPS at forge.evolutionaryscale.ai.
$.servers[*].url
error
evolutionaryscale-bearer-auth
Forge endpoints must use bearer-token security.
$.components.securitySchemes
warn
evolutionaryscale-operation-id-camel
Operation IDs use camelCase (matching the `esm` SDK method names like `batchGenerate`, `inverseFold`).
$.paths.*[get,post,put,delete,patch].operationId
warn
evolutionaryscale-summary-title-case
Operation summaries use Title Case.
$.paths.*[get,post,put,delete,patch].summary
warn
evolutionaryscale-model-enum
Endpoints that accept a `model` field should constrain it to the published Forge checkpoints.
$.components.schemas..properties.model
warn
evolutionaryscale-tag-set
Tags should be drawn from the Forge surface taxonomy (Generation, Encoding, Sampling, Embeddings, Structure, MSA).
$.tags[*].name

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  evolutionaryscale-info-contact:
    description: Every Forge OpenAPI must declare a contact pointing at forge.evolutionaryscale.ai.
    given: $.info.contact
    severity: error
    then:
      - field: name
        function: truthy
      - field: url
        function: pattern
        functionOptions:
          match: "^https://(forge\\.)?evolutionaryscale\\.ai"
  evolutionaryscale-server-https:
    description: Forge servers must use HTTPS at forge.evolutionaryscale.ai.
    given: $.servers[*].url
    severity: error
    then:
      function: pattern
      functionOptions:
        match: "^https://forge\\.evolutionaryscale\\.ai"
  evolutionaryscale-bearer-auth:
    description: Forge endpoints must use bearer-token security.
    given: $.components.securitySchemes
    severity: error
    then:
      field: BearerAuth
      function: truthy
  evolutionaryscale-operation-id-camel:
    description: Operation IDs use camelCase (matching the `esm` SDK method names like `batchGenerate`, `inverseFold`).
    given: $.paths.*[get,post,put,delete,patch].operationId
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"
  evolutionaryscale-summary-title-case:
    description: Operation summaries use Title Case.
    given: $.paths.*[get,post,put,delete,patch].summary
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^([A-Z][A-Za-z0-9]*)( [A-Z0-9][A-Za-z0-9]*)*$"
  evolutionaryscale-model-enum:
    description: Endpoints that accept a `model` field should constrain it to the published Forge checkpoints.
    given: $.components.schemas..properties.model
    severity: warn
    then:
      field: enum
      function: truthy
  evolutionaryscale-tag-set:
    description: Tags should be drawn from the Forge surface taxonomy (Generation, Encoding, Sampling, Embeddings, Structure, MSA).
    given: $.tags[*].name
    severity: warn
    then:
      function: enumeration
      functionOptions:
        values:
          - Generation
          - Encoding
          - Sampling
          - Embeddings
          - Structure
          - MSA