docs(15.9): use the snake_case field names of the admin API - #569
Merged
Merged
Conversation
The admin API maps JSON with CAMEL_TO_LOWER_SNAKE, so request bodies are bound and responses are written with snake_case keys (script_type, sort_order, version_no, ...). Sending the camelCase names shown in the docs leaves every multi-word field unset. Rename the keys in the JSON examples, field tables, curl examples and prose of every 15.9 admin API page in all seven locales. Keys that are map entries rather than bean fields keep their names: user and group attributes (givenName, gidNumber, ...), the log and storage file items (lastModified, hashCode), and the multipart upload parameters (badWordFile, synonymFile, ...). Responses omit null fields, so ldap_admin_security_credentials in the general settings and job_log_id when job logging is off are now described as absent instead of null.
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
The 15.9 admin REST API pages documented the JSON fields in camelCase. Fess maps admin API bodies with
CAMEL_TO_LOWER_SNAKE, so the real request and response fields are snake_case. Sending camelCase makes only the multi-word fields fail as "required", e.g.scriptTypeinstead ofscript_type.This PR changes every documented JSON key in the request/response examples, field tables and curl examples to the name the API actually uses, in all 7 locales and in 15.9 only. Single-word names are unchanged. The names were taken from each
ApiAdmin*Actionand its Body/Form classes.attributes, log/storagelastModified/hashCode);badWordFile).ldap_admin_security_credentialsandjob_log_idcome back asnull.Verification
tools/check_headings.pypasses for all 7 locales.