Complete OpenAPI 3.0 follow-up for servers/events mocks and skill doc accuracy#7
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/disk0Dancer/climate/sessions/25c72d5c-0f45-4c8c-a89d-4bbe77a23492 Co-authored-by: disk0Dancer <89835485+disk0Dancer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/disk0Dancer/climate/sessions/25c72d5c-0f45-4c8c-a89d-4bbe77a23492 Co-authored-by: disk0Dancer <89835485+disk0Dancer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/disk0Dancer/climate/sessions/25c72d5c-0f45-4c8c-a89d-4bbe77a23492 Co-authored-by: disk0Dancer <89835485+disk0Dancer@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
disk0Dancer
April 22, 2026 14:26
View session
There was a problem hiding this comment.
Pull request overview
Closes remaining OpenAPI 3.0 gaps around servers (server variables), improves generated CLI ergonomics for templated server URLs, and tightens docs/skill text accuracy—plus adds a more end-to-end event emission test to real HTTP endpoints.
Changes:
- Extend the OpenAPI model + parser coverage for
servers[].variablesand add env-name normalization for server-variable overrides. - Update generator + skill prompt output to support
--server-var-<name>and<CLI>_SERVER_VAR_<NAME>overrides with interpolation into templated server URLs. - Improve event/mock testing by exercising payload generation + emission to an HTTP endpoint; correct docs/skill output-format statements.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| skills/climate.md | Corrects output-format documentation to reflect text/Markdown commands. |
| skills/climate-generator/SKILL.md | Aligns skill doc “Notes” with actual output behavior (JSON vs plain text). |
| internal/spec/types.go | Adds Server.Variables and ServerVariable to represent OpenAPI server template variables. |
| internal/spec/spec_test.go | Adds tests for parsing server variables and env-var name normalization. |
| internal/spec/env.go | Introduces shared ServerVariableEnvName helper for consistent env naming. |
| internal/skill/skill.go | Documents server-variable override flags/env vars in generated skill prompts. |
| internal/skill/skill_test.go | Adds coverage ensuring prompts include server-variable override docs. |
| internal/mock/mock_test.go | Adds end-to-end-ish test: generate payload + emit to an HTTP endpoint. |
| internal/generator/generator.go | Generates --server-var-* flags, env overrides, and URL interpolation in cmd/root.go. |
| internal/generator/generator_test.go | Verifies generated root.go contains flags/env vars and interpolation logic. |
| docs/openapi-3-support-matrix.md | Updates support matrix to mark servers+variables implemented and clarify callbacks wording. |
| docs/design-compose.md | Updates compose design doc to reflect primary server URL + variable override behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This PR closes the remaining OpenAPI 3.0 gaps called out for
events,mockserver workflows, andserversergonomics, while correcting mismatches in skill/docs text. It adds first-class server-variable handling in generated CLIs and strengthens event emission coverage to real endpoints.OpenAPI model: server variables
spec.Serverto includevariables(default,enum,description) via a newServerVariabletype.servers.variablesfrom OpenAPI YAML/JSON.Generated CLI: server-template interpolation
cmd/root.gonow supports per-variable overrides for templated server URLs:--server-var-<name><CLI>_SERVER_VAR_<NAME>default.internal/spec/env.go) to keep generator and skill prompt behavior consistent.Events/mock: endpoint emission coverage
GenerateEventPayload+EmitEventsending a synthesized event payload to an HTTP endpoint and validating delivered fields.Skill + docs accuracy
skills/climate.md,skills/climate-generator/SKILL.md) where output behavior was overstated as always-JSON.serversbehavior and event-mock wording.Example (new generated CLI behavior):