bootstrap-elixir-openapi

Generate an Elixir API client library from an OpenAPI 3.x specification.

1|Updated May 7, 2026
One-click install
npx skills add https://github.com/agoodway/GoodSkills --skill bootstrap-elixir-openapi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bootstrap-elixir-openapi
Source: https://github.com/agoodway/GoodSkills/tree/main/skills/bootstrap-elixir-openapi
Command: npx skills add https://github.com/agoodway/GoodSkills --skill bootstrap-elixir-openapi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires req, jason, mimic, and includes references (resource) components.

What problem does it solve?

It removes the repetitive, error-prone work of hand-writing Elixir HTTP client functions, schema structs, and tests by generating them directly from an OpenAPI 3.x spec.

Core Features & Use Cases

  • Compile-time client generation: Produces endpoint functions, an HTTP client, and typed structs without runtime code generation.
  • Typed schema structs: Generates from_map/1 conversions for components.schemas, including nested $ref, anyOf/allOf, and array-of-ref cases.
  • Spec-driven tests: Adds unit and integration tests using mocked Req requests (via Mimic) to validate behavior and error handling.

Quick Start

Ask the AI to bootstrap a new Elixir client library from your OpenAPI 3.x spec by running /bootstrap-elixir-openapi and providing the API name, Elixir app/package name, module name, the spec path or URL, and the auth style.

Frequently Asked Questions about bootstrap-elixir-openapi

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an Elixir API client from an OpenAPI spec?

To generate an Elixir API client from an OpenAPI spec, you bootstrap a new library using compile-time extraction of paths and components. This produces typed schema structs, a Req-based HTTP client, endpoint functions, and unit tests directly from the 3.x specification.

How does OpenAPI schema generation handle nested $ref and composition in Elixir?

OpenAPI schema generation handles nested $ref and composition by creating typed structs with recursive from_map/1 conversions. It correctly processes anyOf, allOf, and array-of-ref cases to ensure accurate data parsing for complex API schemas in Elixir.

Can I use Req and Mimic for Elixir OpenAPI client generation?

Yes, you can use Req and Mimic for Elixir OpenAPI client generation. The generated library uses Req for HTTP requests and Mimic to mock those requests, validating behavior and error handling in spec-driven unit and integration tests.

What is the best way to keep an Elixir API client updated when an OpenAPI spec changes?

The best way to keep an Elixir API client updated when an OpenAPI spec changes is using @external_resource-based recompilation. This provides compile-time determinism and allows repeatable regeneration of your scaffolding whenever the specification is modified.

Does generating an Elixir client from OpenAPI support custom authentication headers?

Generating an Elixir client from OpenAPI supports custom authentication headers by requiring correct auth header behavior during the bootstrapping process. You provide the API name, package name, module name, spec path, and auth style to configure it.

When should I not use automated code generation for my Elixir API wrapper?

You should not use automated code generation for your Elixir API wrapper if your project lacks a valid OpenAPI 3.x specification or if you need runtime code generation instead of the compile-time determinism and static scaffolding this approach provides.