Skip to content

Generate an RQM API Client

Prompt template for an agent

Generate a typed RQM API client using only documented routes and schemas from /api/overview/ and Swagger UI.
Never generate undocumented methods.
Use typed request/response models where possible and preserve response envelope metadata.
Include a validate-before-optimize helper and tests that cover documented examples only.
If schema detail is unclear in docs, confirm exact route/schema in Swagger UI before implementation.

Expected modules

  • rqm_client/config
  • rqm_client/http
  • rqm_client/circuits
  • rqm_client/optimization
  • rqm_client/execution
  • rqm_client/errors
  • tests/fixtures

Requirements

  1. Source routes from Swagger/API docs.
  2. Use /api/overview/ and linked route docs.
  3. Confirm route and payload shapes in Swagger UI before code generation.

  4. Never generate undocumented methods.

  5. If a desired feature is not documented, create a TODO with “confirm in Swagger UI” note.

  6. Use typed request/response models where possible.

  7. Represent success/error envelope (status, data/error, meta).
  8. Keep optional fields explicit rather than inferred.

  9. Preserve request IDs / metadata.

  10. Bubble up meta in all client return types.
  11. Keep correlation IDs in logs and test artifacts.

  12. Include validate-before-optimize helper.

  13. Helper must block optimize requests when validation fails.
  14. Helper should return structured validation errors.

  15. Add tests around documented examples only.

  16. Use fixtures grounded in docs.
  17. For missing schema detail, use placeholder fixtures with explicit “confirm schema in Swagger UI” warnings.

Implementation caution

If endpoint details in repository docs and Swagger differ, treat Swagger as the current implementation source and annotate version/date in generated client notes.