Skip to content

feat: export API map as clean structured JSON (GLA-49)#9

Merged
paoloanzn merged 1 commit into
mainfrom
paolo/gla-49-export-map
Mar 7, 2026
Merged

feat: export API map as clean structured JSON (GLA-49)#9
paoloanzn merged 1 commit into
mainfrom
paolo/gla-49-export-map

Conversation

@paoloanzn
Copy link
Copy Markdown
Member

@paoloanzn paoloanzn commented Mar 7, 2026

Summary

  • Add "Export Map" button that exports a clean, documentation-grade JSON file (gladium-api-map-v1 format)
  • One entry per unique endpoint with: method, normalized URL, observation count, authentication headers, request/response schemas
  • Schemas are serialized as clean recursive type trees (object fields, array items, mixed variants, optional markers)
  • Available in both live and snapshot modes whenever endpoints exist (unlike raw snapshot export which is snapshot-only)

Export format example

{
  "format": "gladium-api-map-v1",
  "endpointCount": 2,
  "endpoints": [
    {
      "method": "GET",
      "url": "https://api.example.com/users/:id",
      "observations": 3,
      "authentication": [{ "header": "Authorization", "type": "string" }],
      "request": { "headers": [...], "body": null },
      "response": { "headers": [...], "body": { "contentType": "json", "schema": { ... } } }
    }
  ]
}

Test plan

  • Trigger network activity — verify "Export Map" button enables when endpoints appear
  • Click "Export Map" — verify downloaded JSON has gladium-api-map-v1 format with clean endpoint entries
  • Verify auth headers appear in the authentication array for endpoints with auth
  • Verify request/response body schemas are clean recursive trees (no internal fields like seenCount)
  • Verify export works in both live mode and snapshot mode
  • Verify existing "Export JSON" snapshot export still works unchanged

🤖 Generated with Claude Code

Add "Export Map" button that produces a developer-readable API map file
with one entry per unique endpoint. Each entry includes method,
normalized URL, observation count, authentication headers, and clean
request/response schemas. Available in both live and snapshot modes
whenever endpoints are present. Separate from the raw snapshot export
which retains individual requests and cookies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear Bot commented Mar 7, 2026

GLA-49 Export map

Export the full API map as a clean structured JSON file.

  • One entry per unique endpoint
  • Each entry includes: method, normalized URL, observation count, auth headers, request schema, response schema
  • Output should be readable as informal API documentation

Done when the exported file can be understood by a developer who never saw the original requests.

@paoloanzn paoloanzn merged commit 57fb338 into main Mar 7, 2026
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.

1 participant