{"id":50909843,"url":"https://github.com/p-fruck/rt-openapi","last_synced_at":"2026-06-16T09:01:38.970Z","repository":{"id":361633004,"uuid":"1255193486","full_name":"p-fruck/rt-openapi","owner":"p-fruck","description":"Deterministic OpenAPI spec generation for RequestTracker REST 2.0 API","archived":false,"fork":false,"pushed_at":"2026-06-08T20:24:20.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-08T22:17:32.608Z","etag":null,"topics":["openapi","request-tracker","rt"],"latest_commit_sha":null,"homepage":"https://p-fruck.github.io/rt-openapi/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/p-fruck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-31T14:24:08.000Z","updated_at":"2026-06-08T20:26:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/p-fruck/rt-openapi","commit_stats":null,"previous_names":["p-fruck/rt-openapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/p-fruck/rt-openapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-fruck%2Frt-openapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-fruck%2Frt-openapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-fruck%2Frt-openapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-fruck%2Frt-openapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p-fruck","download_url":"https://codeload.github.com/p-fruck/rt-openapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-fruck%2Frt-openapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34398408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openapi","request-tracker","rt"],"created_at":"2026-06-16T09:01:37.747Z","updated_at":"2026-06-16T09:01:38.965Z","avatar_url":"https://github.com/p-fruck.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RT REST2 OpenAPI Generator (Phase 2)\n\nThis repository builds a deterministic OpenAPI specification baseline for RT REST 2.0 from pinned RT source code and RT test evidence.\n\n## What phase 2 produces\n\n- Complete endpoint inventory: `out/endpoint-inventory.json`\n- Deterministic test evidence map: `out/test-evidence.json`\n- Deterministic test examples map: `out/test-examples.json`\n- Runtime override map from probe analysis: `out/runtime-overrides.json`\n- OpenAPI skeleton (methods + path params + base security):\n  - `spec/openapi.json`\n  - `spec/openapi.yaml`\n\n## Deterministic inputs\n\nPinned RT source is stored in `vendor/rt` and locked in `rt-source.lock.json`.\n\nCurrent lock:\n\n- Repo: `https://github.com/bestpractical/rt.git`\n- Ref: `stable`\n- Commit: `530d776903e05293927600cca506f5336928cf28`\n\n## Generate\n\n```bash\nmake extract\n```\n\n## Probe local RT instance\n\nThis runs safe read-only probes (GET/HEAD) against generated operations and writes `out/probe-results.json`.\n\n```bash\nmake probe\n```\n\nBy default, the probe script auto-loads `.env` from the workspace root and auto-selects auth mode from available credentials (`RT_TOKEN`, `RT_USERNAME` + `RT_PASSWORD`, or `RT_COOKIE`). It uses the configured base URL and falls back to `RT_SERVER` when needed.\n\nOptional auth examples:\n\n```bash\npython3 tools/probe_live_rt.py --workspace . --auth-mode token --token \"1-14-...\" --base-url \"http://localhost\"\npython3 tools/probe_live_rt.py --workspace . --auth-mode basic --user test --password secret --base-url \"http://localhost\"\n```\n\n## Analyze probe results\n\nCompare runtime probe observations to generated OpenAPI responses and produce deterministic reports:\n\n```bash\nmake analyze\n```\n\nOutputs:\n\n- `out/probe-analysis.json`\n- `out/coverage-report.md`\n\nCreate or refresh baseline snapshot:\n\n```bash\nmake snapshot\n```\n\nGenerate delta from current analysis vs baseline:\n\n```bash\nmake delta\n```\n\nDelta outputs:\n\n- `out/probe-delta.json`\n- `out/probe-delta.md`\n- Baseline file: `out/probe-analysis.baseline.json`\n\nOne-shot refresh for generation + probing + analysis:\n\n```bash\nmake phase3\n```\n\n## Notes\n\n- Routes are extracted from `lib/RT/REST2/Resource/*.pm` `dispatch_rules` regex declarations.\n- Methods are extracted from `allowed_methods` when present, with deterministic fallbacks and test-based hints from `t/rest2/*.t`.\n- RT tests are parsed to capture request method/path usage, asserted status codes, and JSON-body hints.\n- RT tests are parsed to extract request payload examples and response key hints, which are attached to operations as examples and metadata.\n- Runtime probe analysis is consumed during extraction to add explicit observed status codes and prune `HEAD` operations that consistently return `405`.\n- The OpenAPI output is still schema-light by design, but now includes test evidence metadata plus runtime evidence metadata.\n- Query parameters are source-derived from resource classes and emitted as reusable OpenAPI component parameters.\n- Collection and record GET responses now reference reusable schemas (`CollectionResponse`, `RecordObject`).\n- Request/response media types are inferred from resource `content_types_accepted`/`content_types_provided` callbacks and included per operation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-fruck%2Frt-openapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp-fruck%2Frt-openapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-fruck%2Frt-openapi/lists"}