US Army Corps of Engineers · API Governance Rules

US Army Corps of Engineers API Rules

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

8 Rules error 2 warn 5 info 1
View Rules File View on GitHub

Rule Categories

usace

Rules

warn
usace-operations-have-tags
All USACE CWMS Data API operations must have at least one tag for grouping
$.paths[*][get,post,put,patch,delete]
warn
usace-operation-ids-kebab-case
Operation IDs should use camelCase as per USACE API conventions
$.paths[*][get,post,put,patch,delete].operationId
warn
usace-parameters-have-descriptions
All query parameters should have descriptions for CWMS API usability
$.paths[*][*].parameters[?(@.in == 'query')]
info
usace-pagination-page-size
CWMS Data API uses page-size parameter for pagination
$.paths[*][get].parameters[*]
error
usace-response-200-defined
All GET operations must define a 200 response
$.paths[*][get]
warn
usace-error-schema-defined
Error responses should reference the Error schema
$.paths[*][*].responses[?(@property >= '400')]
warn
usace-no-trailing-slash
API paths should not have trailing slashes
$.paths
error
usace-server-url-https
USACE API servers must use HTTPS
$.servers[*].url

Spectral Ruleset

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

  usace-operation-ids-kebab-case:
    description: Operation IDs should use camelCase as per USACE API conventions
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"

  usace-parameters-have-descriptions:
    description: All query parameters should have descriptions for CWMS API usability
    severity: warn
    given: "$.paths[*][*].parameters[?(@.in == 'query')]"
    then:
      field: description
      function: truthy

  usace-pagination-page-size:
    description: CWMS Data API uses page-size parameter for pagination
    severity: info
    given: "$.paths[*][get].parameters[*]"
    then:
      function: schema
      functionOptions:
        schema:
          if:
            properties:
              name:
                const: page-size
          then:
            properties:
              schema:
                properties:
                  type:
                    const: integer

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

  usace-error-schema-defined:
    description: Error responses should reference the Error schema
    severity: warn
    given: "$.paths[*][*].responses[?(@property >= '400')]"
    then:
      field: content
      function: truthy

  usace-no-trailing-slash:
    description: API paths should not have trailing slashes
    severity: warn
    given: "$.paths"
    then:
      function: pattern
      functionOptions:
        notMatch: ".*/$"

  usace-server-url-https:
    description: USACE 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/usace-cwms-data-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.