US Army · API Governance Rules

US Army API Rules

Spectral linting rules defining API design standards and conventions for US Army.

7 Rules error 2 warn 4 info 1
View Rules File View on GitHub

Rule Categories

army

Rules

warn
army-operations-have-tags
All US Army API operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
info
army-paths-use-v1-prefix
All Army API paths should use the /api/v1 prefix via servers configuration
$.servers[*].url
error
army-get-operations-have-200
All GET operations must define a 200 response
$.paths[*][get]
warn
army-operations-have-operation-ids
All Army API operations must have operationId for SDK generation
$.paths[*][get,post,put,patch,delete]
warn
army-parameters-have-descriptions
All parameters should have descriptions
$.paths[*][*].parameters[*]
warn
army-responses-have-schemas
All 200 responses should define a content schema
$.paths[*][*].responses.200
error
army-server-https
US Army API servers must use HTTPS
$.servers[*].url

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  army-operations-have-tags:
    description: All US Army API operations must have at least one tag
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: tags
      function: truthy

  army-paths-use-v1-prefix:
    description: All Army API paths should use the /api/v1 prefix via servers configuration
    severity: info
    given: "$.servers[*].url"
    then:
      function: pattern
      functionOptions:
        match: ".*\/v[0-9].*"

  army-get-operations-have-200:
    description: All GET operations must define a 200 response
    severity: error
    given: "$.paths[*][get]"
    then:
      field: responses.200
      function: truthy

  army-operations-have-operation-ids:
    description: All Army API operations must have operationId for SDK generation
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: operationId
      function: truthy

  army-parameters-have-descriptions:
    description: All parameters should have descriptions
    severity: warn
    given: "$.paths[*][*].parameters[*]"
    then:
      field: description
      function: truthy

  army-responses-have-schemas:
    description: All 200 responses should define a content schema
    severity: warn
    given: "$.paths[*][*].responses.200"
    then:
      field: content
      function: truthy

  army-server-https:
    description: US Army API servers must use HTTPS
    severity: error
    given: "$.servers[*].url"
    then:
      function: pattern
      functionOptions:
        match: "^https://"

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/us-army-public-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.