Infer a normalized generation model from OpenAPI and apply bundled or project-owned Jinja template packs.
python -m pip install codepotgOn this page
Frontend, language, and output variables
Frontend collections
A task can select one frontend by name or expose all explicitly authored frontends where supported.
Frontend values
Components
Each frontend component exposes:
Operation and schema uses preserve aliases and resolved targets where available.
Screens
Each screen exposes:
Operation uses preserve alias, operation ID, resolved operation, method, path, purpose, and source metadata.
Selected frontends
selected_frontendis the single explicitly selected frontend when the task chooses one.selected_frontendsis the ordered selected collection.frontend_countreports its size.
Templates should not infer an unselected frontend from naming conventions.
lang
Language adapters can add stable helper groups for:
- type rendering;
- literals;
- validation;
- imports;
- identifiers;
- files;
- comments;
- documentation;
- framework integration;
- package integration.
The exact helper fields depend on the selected adapter. Use the adapter contract rather than calling internal Python utilities from templates.
emit
Current emission information can include:
file
file.output_path is the planned target. It does not grant unrestricted filesystem access.
Project metadata
Use project values for package headers, generated comments, namespaces, and root-level configuration.
Features
features exposes normalized capability flags assembled from source, language, pack, and selected frontend information. Check a feature flag rather than assuming every source includes entities, hooks, or frontend definitions.
Example screen template
Real templates should consume resolved operations, schemas, parameters, and component providers.
Guidance
- Keep frontend selection explicit in the task.
- Use
full_routewhen the route prefix has already been resolved. - Generate operation clients from resolved uses, not duplicate IDs.
- Use planned imports and dependencies.
- Keep output paths in
paths.yamland file contents in Jinja. - Treat language helpers as the target-specific boundary.