feat: add the tagtype command for user tags - #37
Merged
Merged
Conversation
Add `fessctl tagtype` (create/update/delete/get/list) for the /api/admin/tagtype admin API, following the labeltype command. `update` reads the tag first and sends back every unchanged field, including its paths, seq_no and primary_term, since the PUT replaces the whole tag; it reports the new id when a rename changes it. The integration test skips when the Fess under test does not provide the API; unit tests cover the update merge with a mocked client.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
fessctl tagtypefor the/api/admin/tagtypeadmin API, which manages per-user tags (codelibs/fess#3551, Fess 15.9). It follows thelabeltypecommand.create/get/list/update/delete--name,--owner,--path(repeatable),--permission(repeatable),--virtual-host,--sort-orderupdate: the PUT replaces the whole tag, so the command reads the tag first and sends back every field you did not change. That includes itspaths,seq_noandprimary_term. When a rename changes the id, the command reports the new id.list: the API leaves out each tag's paths; usegetto see them.SKILL.md,references/features/tagtype.md) are updated.Testing
uv run pytest tests/unit: 129 passed, including new mocked tests for create, list and the update merge.tagtype(full create/get/update/list/delete cycle, and the paths survive an update) and forlabeltype.--sort-orderexits 1 with a validation error.tagtypeintegration test skips on Fess versions without the API, such as 15.8.