AgStack Foundation · API Governance Rules
AgStack Foundation API Rules
Spectral linting rules defining API design standards and conventions for AgStack Foundation.
16 Rules
error 6
warn 10
Rule Categories
agstack
Rules
warn
agstack-operation-summary-title-case
Operation summaries should use Title Case
$.paths[*][*].summary
error
agstack-operationid-defined
All operations must define an operationId
$.paths[*][get,post,put,delete,patch]
error
agstack-response-200-defined
All operations must define a successful response
$.paths[*][*].responses
warn
agstack-response-422-validation-error
FastAPI operations should document 422 validation errors
$.paths[*][get,post].responses
warn
agstack-security-bearer-defined
Protected operations must declare Bearer security
$.paths[*][post,put,delete,patch]
error
agstack-info-version
API must define a version
$.info
warn
agstack-info-description
API must include a description
$.info
error
agstack-server-url-defined
API must define at least one server URL
$.servers
warn
agstack-schema-type-defined
Schema components must define a type
$.components.schemas[*]
warn
agstack-request-body-content-type
POST/PUT request bodies should specify application/json content type
$.paths[*][post,put].requestBody.content
warn
agstack-tags-on-operations
All operations should have tags for grouping
$.paths[*][*]
warn
agstack-geo-id-format
Geo ID fields should follow AgStack's 16-character alphanumeric format
$.components.schemas[*].properties.geo_id
error
agstack-openapi-version-3
API must use OpenAPI 3.x
$.openapi
warn
agstack-description-field-length
Operation descriptions should be meaningful (min 10 chars)
$.paths[*][*].description
error
agstack-geojson-type-field
GeoJSON schemas must include a type field
$.components.schemas.GeoJSONOut.properties
warn
agstack-paths-lowercase
API paths should use lowercase and hyphens
$.paths