Skip to content

Firestone

2 fixes in firestoned/firestone, maintained by Firestoned.

Back to all open-source fixes

About Firestone

Firestone is a resource-based code generator. From simple JSON Schema resource definitions it generates OpenAPI and AsyncAPI specifications, CLIs, and server code, so teams can describe a resource once and get consistent APIs and tooling from it.

My work on it

My work on Firestone is in its spec generators. I fixed one bug that made AsyncAPI generation crash on every input, and one that left generated APIs unsecured when a resource-wide security scheme was configured. Both were found by running the generators against the project’s own examples and documentation.

Restoring AsyncAPI generation

The problem. The AsyncAPI generator crashed every time, even on the project’s own example. A schema field had been renamed, and one lookup in the AsyncAPI generator was missed. There were no AsyncAPI tests to catch it.

The fix. The correct value was already available in the generator but was never passed to the function that needed it. The fix passes it along.

How I tested it. Confirmed the example that previously crashed now generates a complete AsyncAPI document.

Applying resource-wide security to every endpoint

The problem. The docs say a security scheme without per-method lists applies to all methods, but in practice it applied to none. The setting was built and then stored where nothing read it, so a server generated from that spec would accept unauthenticated requests without any warning.

The fix. When no per-method lists are given, the generator now fills them in with every method, so the existing per-method logic secures each endpoint.

How I tested it. Added tests for both cases, with and without per-method lists, and confirmed the project’s example output is unchanged.