Add ASM OpenAPI 3.1 spec and CI linting workflow#1
Merged
Conversation
Creates asm/openapi.yaml — a complete OpenAPI 3.1 scaffold covering the four core ASM resource groups (Assets, Scans, Vulnerabilities, Tags) with full schemas, pagination, error shapes, and security definition. Adds .github/workflows/validate-openapi.yml to lint specs with Spectral on every PR touching an openapi.yaml file, catching spec regressions before merge. https://claude.ai/code/session_01EAxtNqFuP97kjcQ9W88thh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The README's Contents table advertises
asm/openapi.yaml,sat/openapi.yaml, MCP definitions, guides, and SDK examples — but none of those files exist. Any developer or API consumer who visits this repo expecting a spec gets nothing. This is the highest-leverage gap to close first.What this PR adds
asm/openapi.yaml— OpenAPI 3.1 scaffold for HailBytes ASMA complete, valid OpenAPI 3.1 specification covering four resource groups:
GET /assets,GET /assets/{id},PATCH /assets/{id},DELETE /assets/{id}GET /scans,POST /scans,GET /scans/{id}GET /vulnerabilities,GET /vulnerabilities/{id},PATCH /vulnerabilities/{id}GET /tags,POST /tagsIncludes:
meta.total,meta.page,meta.per_page)$refcomponentsAssetDetail(open ports, certificates),ScanDetail(summary stats),VulnerabilityDetail(remediation, CVEs, audit history).github/workflows/validate-openapi.yml— Spectral CI lintingRuns
@stoplight/spectral-cliagainst any*/openapi.yamlfile on every push/PR that touches a spec. Catches broken$refs, missing required fields, and OAS rule violations before they reachmain. Conditionally skips specs that don't exist yet (so thesat/openapi.yamlstep won't fail until that file is added).Next steps
sat/openapi.yamlfor the SAT productmcp/README.mdwith MCP tool definitionshttps://claude.ai/code/session_01EAxtNqFuP97kjcQ9W88thh
Generated by Claude Code