Skip to content

Feat/kb endpoints api 2.3#12

Open
baraline wants to merge 18 commits into
mainfrom
feat/kb-endpoints-api-2.3
Open

Feat/kb endpoints api 2.3#12
baraline wants to merge 18 commits into
mainfrom
feat/kb-endpoints-api-2.3

Conversation

@baraline

@baraline baraline commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Update to add support for knowledge base endpoint on the REST API v2.3 of GLPI.

baraline and others added 17 commits July 7, 2026 15:41
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Refresh docs/glpi_api_contract.json from 2.2.0 (677 paths) to 2.3.0 (1237 paths). The Knowledgebase surface (10 paths, 5 component schemas) is unchanged; expansions are elsewhere (Assets, Dropdowns, Rule, Setup, Management, Assistance, Project) plus new Inventory/Notifications/Localization groups. Prep for the knowledge base endpoints feature.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Also wires the mixin into AsyncGlpiClient's mixin list (async_client.py),
which the plan's Global Constraints describe as automatic via AsyncBridge
but which in practice duplicates the sync mixin list and required an
explicit update to keep the parity test green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Also wires the mixin into AsyncGlpiClient's mixin list (async_client.py)
alongside sync_client.py, matching the KBCategoryMixin wiring.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Also wires the mixin into AsyncGlpiClient's mixin list (async_client.py)
alongside sync_client.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lient

Also wires the mixin into AsyncGlpiClient's mixin list (async_client.py)
alongside sync_client.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adversarial review + live GLPI 2.3.0 validation follow-ups:
- PostKBArticle: expose writable `user` (contract marks user.id rw; the
  spec's exclusion list never covered it).
- PostKBArticleComment: expose writable `user`, drop read-only `parent`.
- Strengthen the inbound HTML->Markdown assertions (were vacuous: raw HTML
  also contained the probe string) on article + revision Get models.
- Add POST/create failure-status coverage for every KB resource.
- Use @pytest.mark.usefixtures for the KB integration capability probe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… 2.3.0

Preprod was upgraded to High-Level API 2.3.0, so the KB endpoints are now
reachable. Expand the integration suite from 2 stubs to 4 tests covering
every KB helper end-to-end (category/article/comment CRUD + search, and
revision list/get), grounded on observed live behavior:
- create responses carry an `id` key;
- article content/description round-trip Markdown through GLPI HTML;
- comment and revision list endpoints return flat arrays (no envelope).

Also fix the user_guide example: an article's `categories` association is
read-only in the contract (GLPI ignores it on write), so the example no
longer implies create-time linkage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Jul 9, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.16%. Comparing base (eca191f) to head (d753960).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
+ Coverage   96.88%   97.16%   +0.27%     
==========================================
  Files          67       77      +10     
  Lines        2185     2397     +212     
==========================================
+ Hits         2117     2329     +212     
  Misses         68       68              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The generated contract (docs/glpi_api_contract.json) is very large and is
a local development reference, not a runtime dependency (no test loads it).
Remove it from version control and gitignore it; the file stays on disk for
local use.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants