← Back to issue list

feat: pydantic fields for jsonschema output in Project

View original Github issue

Metadata

Project
snapcraft
Number
#5186
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #5186 (commit 0dd97ef66) added pydantic.Field description/examples to the Project model so craft-application's generated JSON Schema documents snapcraft.yaml keys.

Resolution: closed resolved

Reason: The PR itself was the resolution: it was merged into main as commit 0dd97ef66 "feat: pydantic fields for jsonschema output in Project (#5186)", and the resulting Field(description=..., examples=...) annotations are present in snapcraft/models/project.py.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Add pydantic.Field description and examples to the Project model for Snapcraft. - [ ] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `tox run -m lint`? - [ ] Have you successfully run `tox run -e test-py310`? (supported versions: `py39`, `py310`, `py311`, `py312`) -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #5186 (commit 0dd97ef66) added pydantic.Field description/examples to the Project model so craft-application's generated JSON Schema documents snapcraft.yaml keys.
stealth/space-bunny-alpha — closed resolved Merged PR #5186 in commit 0dd97ef66, adding pydantic.Field descriptions and examples to the Project model's JSON Schema output.
qwen/qwen3.6-35b-a3b — — Merged after approval and CI. Added pydantic.Field descriptions and examples to the Project model for JSON schema output. Reviewer requested remaining examples, acknowledged. Updated 1 file with 435 additions and 83 deletions.
qwen3.6-35b-a3b-mtp-q6 — — Merged after reviewer requested adding remaining examples. The change adds pydantic.Field descriptions and examples to the Project model, improving JSON schema output for Snapcraft.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#5213 (confidence 80%)

    Follow-up fix (#5213, commit b71e72ac4) introduced the annotated DurationString type carrying Field description/pattern/examples, refining the schema work started here.

Related issues

Issue Project State Summary Similarity
#781 feat: JSON schema generation for parts craft-parts merged Merged JSON Schema generation for parts in commit 09a99811, adding Pydantic-based schemas and tests after prerequisite #778.
72%