Skip to content

move Category to liquid and introduce Category.DisplayName#81

Merged
majewsky merged 1 commit intomainfrom
move_category
Feb 26, 2026
Merged

move Category to liquid and introduce Category.DisplayName#81
majewsky merged 1 commit intomainfrom
move_category

Conversation

@wagnerd3
Copy link
Copy Markdown
Contributor

@wagnerd3 wagnerd3 commented Feb 24, 2026

When filing sapcc/limes#839, I noticed that we make heavy use of the ResourceInfo.Category which is currently part of limesresources. The problem with that is many display names are ambiguous, if you ignore the Category. This makes the liquids configuration kind of invalid on its own, because it relies on the Category to be added in Limes.

In order to solve this, we:

  • move the Category to the liquid definition
  • introduce a DisplayName on the Category to be shown to users, similar to ResourceInfo, RateInfo, ServiceInfo

@wagnerd3 wagnerd3 requested a review from a team as a code owner February 24, 2026 10:38
Copy link
Copy Markdown
Contributor

@majewsky majewsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more small points:

@github-actions
Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/sapcc/go-api-declarations/liquid 82.60% (+1.81%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/sapcc/go-api-declarations/liquid/info.go 100.00% (ø) 80 (+15) 80 (+15) 0
github.com/sapcc/go-api-declarations/liquid/validation.go 91.02% (+1.89%) 835 (+145) 760 (+145) 75 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/sapcc/go-api-declarations/liquid/info_test.go
  • github.com/sapcc/go-api-declarations/liquid/validation_test.go

@majewsky majewsky merged commit a35226a into main Feb 26, 2026
6 checks passed
@majewsky majewsky deleted the move_category branch February 26, 2026 13:06
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