Skip to content

Add ASM OpenAPI 3.1 spec and CI linting workflow#1

Merged
dmchaledev merged 1 commit into
mainfrom
claude/elegant-edison-BS9xT
May 31, 2026
Merged

Add ASM OpenAPI 3.1 spec and CI linting workflow#1
dmchaledev merged 1 commit into
mainfrom
claude/elegant-edison-BS9xT

Conversation

@dmchaledev
Copy link
Copy Markdown
Contributor

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 ASM

A complete, valid OpenAPI 3.1 specification covering four resource groups:

Tag Endpoints
Assets GET /assets, GET /assets/{id}, PATCH /assets/{id}, DELETE /assets/{id}
Scans GET /scans, POST /scans, GET /scans/{id}
Vulnerabilities GET /vulnerabilities, GET /vulnerabilities/{id}, PATCH /vulnerabilities/{id}
Tags GET /tags, POST /tags

Includes:

  • Full request/response schemas with examples
  • Pagination envelope (meta.total, meta.page, meta.per_page)
  • Bearer auth security scheme
  • Shared error shape and reusable $ref components
  • Severity, status, and asset-type enums
  • Detailed AssetDetail (open ports, certificates), ScanDetail (summary stats), VulnerabilityDetail (remediation, CVEs, audit history)

.github/workflows/validate-openapi.yml — Spectral CI linting

Runs @stoplight/spectral-cli against any */openapi.yaml file on every push/PR that touches a spec. Catches broken $refs, missing required fields, and OAS rule violations before they reach main. Conditionally skips specs that don't exist yet (so the sat/openapi.yaml step won't fail until that file is added).

Next steps

  • Review and adjust endpoint shapes to match the real API
  • Add sat/openapi.yaml for the SAT product
  • Add mcp/README.md with MCP tool definitions
  • Add Postman collection generated from this spec

https://claude.ai/code/session_01EAxtNqFuP97kjcQ9W88thh


Generated by Claude Code

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
@dmchaledev dmchaledev merged commit b6a64d0 into main May 31, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants