Skip to content

feat: Add OpenAPI-based typed HTTP client generation#2

Merged
yufeiminds merged 3 commits into
mainfrom
copilot/add-openapi-client-with-static-types
Apr 16, 2026
Merged

feat: Add OpenAPI-based typed HTTP client generation#2
yufeiminds merged 3 commits into
mainfrom
copilot/add-openapi-client-with-static-types

Conversation

Copilot AI commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add generation of src/generated/client.mbt from OpenAPI operations
  • generate a typed ApiTransport abstraction and ApiClient with one static-typed method per operation
  • generate request shaping for path/query/body and typed JSON response decoding
  • extend OpenAPI operation IR with preferred success-status metadata to drive client response handling
  • update README with a new typed-client section and generated layer updates
  • add/update petstore example to demonstrate typed client usage

Validation

  • parallel_validation (Code Review): passed with no comments
  • parallel_validation (CodeQL): no analyzable language changes detected
  • local toolchain checks attempted (moon check, moon fmt --check, moon build, moon test) but MoonBit CLI is not available in this environment (moon: command not found)

Copilot AI and others added 2 commits April 16, 2026 18:58
Agent-Logs-Url: https://github.com/cogna-dev/mapi/sessions/6bb8051a-cbb3-424c-9003-fae9742ac501

Co-authored-by: yufeiminds <9150374+yufeiminds@users.noreply.github.com>
Agent-Logs-Url: https://github.com/cogna-dev/mapi/sessions/6bb8051a-cbb3-424c-9003-fae9742ac501

Co-authored-by: yufeiminds <9150374+yufeiminds@users.noreply.github.com>
@yufeiminds

Copy link
Copy Markdown
Contributor

@copilot bump version to v0.1.1, remove outdated design.md, fix ci

Copilot AI commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

@copilot bump version to v0.1.1, remove outdated design.md, fix ci

Done in commit a1990e9: bumped version references to 0.1.1 (root/package generation/state metadata/docs), removed design.md, and applied the Moon formatter-required style fixes in main/generator.mbt and main/parser.mbt that were failing pre-commit in CI.

@yufeiminds
yufeiminds marked this pull request as ready for review April 16, 2026 19:47
@yufeiminds yufeiminds changed the title Add OpenAPI-based typed HTTP client generation feat: Add OpenAPI-based typed HTTP client generation Apr 16, 2026
@yufeiminds
yufeiminds merged commit 0114c3a into main Apr 16, 2026
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