API inputs that take an enum as text accept member names only #317
No reviewers
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil!317
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/296-enum-names-only"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
API inputs that parse an enum from text now accept member names only (owner decision Q-REL-5); digit strings, undefined numbers, flag masks and comma lists answer 400 with the list of valid names.
EnumNameParser(Ninlil.Common.Extension/Enum): exact declared name, case-insensitive where the site already was, canonical name returned (an alias such asSslProtocols.Defaultkeeps its own name).DhcpTagRulesController.ParseMatchMode(PATCHvendorClassIdentifierMatchMode,userClassMatchMode; a non-string value now gives 400 instead of an unhandled exception),RecursiveSettingsControllertrust-anchoralgorithm,WebListenSettingsControllerandTransportSettingsControllercertificate.allowedProtocols[](one name per entry; stored canonically),TransportSettingsControllerenabledEsVersions[](stored canonically),QueryLogControllerfilters (wire-name fallback kept).SslProtocolsnames (Ssl2,Ssl3,Tls,Tls11,Default) are accepted by name as before; their digit and mask forms are refused.Tls12,Tls13,XChaCha20Poly1305,Exact,Prefix,RSASHA256and the other wire names for trust anchors) still pass (verifier checked).dnssecAlgorithm"200"is stored, the tag-rule POST takes a bare5), plus a few other text sites; filed as #316 for a design decision, because the converter accepts digit strings on purpose for unnamed wire codes.Tests:
EnumNamesOnlyApiTests(37 cases; 27 fail on develop as assertions) andEnumNameParserTests(17). Whole solution without Docker passes (shared library changed), Web.Tests 2118, OpenAPI snapshot unchanged; build 0 warnings; csharpier clean.Closes #296
🤖 Generated with Claude Code
https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK