{"record":{"id":"c73f72547516a0b8","repo":"DioxusLabs/dioxus","slug":"unexpected-field-expected-one-of-summary-descri","errorCode":null,"errorMessage":"unexpected field, expected one of (summary, description, id, hidden, tags, security, responses, transform)","messagePattern":"unexpected field, expected one of \\(summary, description, id, hidden, tags, security, responses, transform\\)","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/fullstack-macro/src/lib.rs","lineNumber":1274,"sourceCode":"            security: None,\n            responses: None,\n            transform: None,\n        };\n\n        while !input.is_empty() {\n            let ident = input.parse::<Ident>()?;\n            let _ = input.parse::<Token![:]>()?;\n            match ident.to_string().as_str() {\n                \"summary\" => this.summary = Some((ident, input.parse()?)),\n                \"description\" => this.description = Some((ident, input.parse()?)),\n                \"id\" => this.id = Some((ident, input.parse()?)),\n                \"hidden\" => this.hidden = Some((ident, input.parse()?)),\n                \"tags\" => this.tags = Some((ident, input.parse()?)),\n                \"security\" => this.security = Some((ident, input.parse()?)),\n                \"responses\" => this.responses = Some((ident, input.parse()?)),\n                \"transform\" => this.transform = Some((ident, input.parse()?)),\n                _ => {\n                    return Err(syn::Error::new(\n                        ident.span(),\n                        \"unexpected field, expected one of (summary, description, id, hidden, tags, security, responses, transform)\",\n                    ));\n                }\n            }\n            let _ = input.parse::<Token![,]>().ok();\n        }\n\n        Ok(this)\n    }\n}\n\nimpl OapiOptions {\n    fn merge_with_fn(&mut self, function: &ItemFn) {\n        if self.description.is_none() {\n            self.description = doc_iter(&function.attrs)\n                .skip(2)\n                .map(|item| item.value())","sourceCodeStart":1256,"sourceCodeEnd":1292,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/393d190a801ccb441d41923e232289b4f8a5c669/packages/fullstack-macro/src/lib.rs#L1256-L1292","documentation":"The OpenAPI options block inside `#[api_route(...)]` is parsed key by key; only summary, description, id, hidden, tags, security, responses and transform are recognized (packages/fullstack-macro/src/lib.rs:1264-1277). Any other identifier inside that block is rejected with this error listing the valid keys.","triggerScenarios":"Writing `#[api_route(GET, \"/pets\", operation_id = \"list\")]` (should be `id`); `title = \"...\"` instead of `summary`; `parameters = ...` or `request_body = ...` which this macro does not expose (params come from the function signature); misspelling a key like `respones`.","commonSituations":"Porting annotations from utoipa/aide attributes (`operation_id`, `request_body`, `parameters`) that never existed here; guessing key names from OpenAPI spec vocabulary instead of the macro's list; version upgrades that add/rename keys (check the current eight).","solutions":["Use one of the eight allowed keys: summary, description, id, hidden, tags, security, responses, transform.","Map OpenAPI vocabulary to macro keys: `operation_id` -> `id`, `title` -> `summary`; describe request/response shapes via `responses` or `transform`.","For advanced cases (custom parameters, request bodies), pass an aide `transform` closure that mutates the generated operation."],"exampleFix":"// before\n#[api_route(GET, \"/pets\", operation_id = \"list_pets\")]\nasync fn list_pets() -> Json<Vec<Pet>> { ... }\n\n// after\n#[api_route(GET, \"/pets\", id = \"list_pets\")]\nasync fn list_pets() -> Json<Vec<Pet>> { ... }","handlingStrategy":"validation","validationCode":"ALLOWED = {\"summary\", \"description\", \"id\", \"hidden\", \"tags\", \"security\", \"responses\", \"transform\"}\n# Fail on unknown keys inside the OpenAPI options section of an api_route attribute\nimport re, sys\nfor m in re.finditer(r'#\\[api_route\\([^)]*\\)\\]', open('src/api.rs').read()):\n    for k in re.findall(r'(\\w+)\\s*=', m.group(0)):\n        if k in ALLOWED:\n            continue\n        if k not in {\"GET\", \"POST\", \"PUT\", \"DELETE\", \"PATCH\"}:\n            sys.exit(f'unknown api_route key {k!r}; allowed: {sorted(ALLOWED)}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the eight valid keys (summary, description, id, hidden, tags, security, responses, transform) next to the api_route import in your docs.","For anything the keys cannot express, use the transform closure on the generated operation instead of inventing keys."],"tags":["dioxus","proc-macro","openapi","api-route","compile-time"],"backgroundTag":null,"analyzedSha":"393d190a801ccb441d41923e232289b4f8a5c669","analyzedAt":"2026-08-16T11:27:45.815Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}