Skip to content

Improve Pydantic model documentation for OpenAPI schema#241

Open
simransingh-dev wants to merge 1 commit into
ionfwsrijan:mainfrom
simransingh-dev:improve-pydantic-docs
Open

Improve Pydantic model documentation for OpenAPI schema#241
simransingh-dev wants to merge 1 commit into
ionfwsrijan:mainfrom
simransingh-dev:improve-pydantic-docs

Conversation

@simransingh-dev

@simransingh-dev simransingh-dev commented Jun 28, 2026

Copy link
Copy Markdown

Linked issue

Closes #229

What this PR does

This PR improves the OpenAPI documentation by adding descriptions and examples to Pydantic models in backend/app/models.py. The added metadata makes the generated API schema more informative and easier for developers to understand and use.

Type of change

  • Bug fix
  • New feature
  • ML model / training pipeline
  • Refactor (no behaviour change)
  • Documentation
  • Tests only

ML tier (if applicable)

  • Tier 1 — Triage
  • Tier 2 — Predictive
  • Tier 3 — Autonomous
  • Not ML-related

Stack affected

  • Backend
  • Frontend
  • Both

Changes

Backend

  • Added descriptions and examples to fields in Finding and ScanResponse Pydantic models.
  • Improved generated OpenAPI documentation without changing application behaviour.

Frontend

None.

New dependencies

None.

Database / schema changes

None.

Testing

  • Verified the updated Pydantic models locally.
  • Confirmed there are no syntax errors.
  • Confirmed that application behaviour remains unchanged.
  • Verified that only the generated OpenAPI documentation is affected.

Checklist

  • No new console.error or unhandled Python exceptions introduced.
  • No new dependencies were added.
  • No model files (.pkl, .pt, etc.) were added.
  • This is a documentation-only change.

Anything reviewers should focus on

Please review the added field descriptions and examples for clarity and consistency in the generated OpenAPI schema.

Screenshots (if UI changed)

N/A (No UI changes)

@github-actions

Copy link
Copy Markdown

🎉 Thank you @simransingh-dev for submitting a Pull Request!

We're excited to review your contribution.

Before Review

✅ Ensure all CI checks pass
✅ Complete the PR template
✅ Link the related issue

Want faster reviews and contributor support?

Join our Discord community:

🔗 https://discord.gg/FcXuyw2Rs

Maintainers and mentors are active there and can help resolve blockers quickly.

Happy Contributing! 🚀

@github-actions github-actions Bot added backend Backend issues documentation Improvements or additions to documentation refactor Refactoring of code SSoC26 needs-work Work needed labels Jun 28, 2026
@github-actions

Copy link
Copy Markdown

⚠️ Automated Check: This PR does not strictly follow the required template. Please ensure you have not deleted any checkboxes or mandatory headings, and that you have written explanations under What this PR does and How did you test this?.

Correct PR Template

Please copy and paste the raw template below into your PR description and fill it out:

> **Before opening:** make sure there is an issue tracking this work, and link it below. PRs without a linked issue may be closed without review.

## Linked issue

Closes #

## What this PR does



## Type of change

- [ ] Bug fix
- [ ] New feature
- [ ] ML model / training pipeline
- [ ] Refactor (no behaviour change)
- [ ] Documentation
- [ ] Tests only

## ML tier (if applicable)

- [ ] Tier 1 — Triage
- [ ] Tier 2 — Predictive
- [ ] Tier 3 — Autonomous
- [ ] Not ML-related

## Stack affected

- [ ] Backend
- [ ] Frontend
- [ ] Both

---

## Changes

### Backend



-

### Frontend



-

### New dependencies



-

### Database / schema changes



-

---

## Testing

**How did you test this?**



**Checklist**

- [ ] Tested locally end-to-end (upload ZIP or GitHub URL → scan → findings returned correctly)
- [ ] New ML model falls back gracefully when model file is absent
- [ ] No new `console.error` or unhandled Python exceptions introduced
- [ ] Added or updated tests where applicable
- [ ] `requirements.txt` / `package.json` updated if new dependencies added
- [ ] New model files (`.pkl`, `.pt`, etc.) are gitignored, not committed

---

## Anything reviewers should focus on



## Screenshots (if UI changed)

@github-actions github-actions Bot added the frontend Frontend issues label Jun 28, 2026
@arpit2006

Copy link
Copy Markdown
Collaborator

@simransingh-dev , Fix template issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend issues changes-required checks-failing CI-Fail documentation Improvements or additions to documentation frontend Frontend issues good first issue Good for newcomers help wanted Extra attention is needed needs-work Work needed quality-issue refactor Refactoring of code SSoC26 template-issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Documentation] Improve Pydantic Model Documentation for OpenAPI Schema

2 participants