{"record":{"id":"540d250427a3876f","repo":"DioxusLabs/dioxus","slug":"keyword-argument-repeated-input","errorCode":null,"errorMessage":"keyword argument repeated: `input`","messagePattern":"keyword argument repeated: `input`","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/fullstack-macro/src/lib.rs","lineNumber":1596,"sourceCode":"                        }\n                        encoding = Some(stream.parse()?);\n                    } else if key == \"endpoint\" {\n                        if fn_path.is_some() {\n                            return Err(syn::Error::new(\n                                key.span(),\n                                \"keyword argument repeated: `endpoint`\",\n                            ));\n                        }\n                        fn_path = Some(stream.parse()?);\n                    } else if key == \"input\" {\n                        if encoding.is_some() {\n                            return Err(syn::Error::new(\n                                key.span(),\n                                \"`encoding` and `input` should not both be \\\n                                 specified\",\n                            ));\n                        } else if input.is_some() {\n                            return Err(syn::Error::new(\n                                key.span(),\n                                \"keyword argument repeated: `input`\",\n                            ));\n                        }\n                        input = Some(stream.parse()?);\n                    } else if key == \"input_derive\" {\n                        if input_derive.is_some() {\n                            return Err(syn::Error::new(\n                                key.span(),\n                                \"keyword argument repeated: `input_derive`\",\n                            ));\n                        }\n                        input_derive = Some(stream.parse()?);\n                    } else if key == \"output\" {\n                        if encoding.is_some() {\n                            return Err(syn::Error::new(\n                                key.span(),\n                                \"`encoding` and `output` should not both be \\","sourceCodeStart":1578,"sourceCodeEnd":1614,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/393d190a801ccb441d41923e232289b4f8a5c669/packages/fullstack-macro/src/lib.rs#L1578-L1614","documentation":"The `input = ...` key (input codec for a `#[server]` function) may be specified at most once. A second `input` occurrence — or one following `encoding` — is rejected (packages/fullstack-macro/src/lib.rs:1595-1600).","triggerScenarios":"`#[server(input = Json, input = Multipart)]`; copy-paste duplication; attempting to layer codecs (e.g. compressed JSON) by listing `input` twice.","commonSituations":"Refactors that append rather than replace attribute args; merge conflicts; scaffolding templates that already include an `input` key.","solutions":["Keep a single `input = ...` entry.","If layering is needed (compression, custom formats), implement one custom codec type implementing the codec traits and reference it once.","Lint attributes for duplicate keys after automated edits."],"exampleFix":"// before\n#[server(input = Json, input = Multipart)]\nasync fn upload(file: Vec<u8>) { ... }\n\n// after\n#[server(input = Multipart)]\nasync fn upload(file: Vec<u8>) { ... }","handlingStrategy":"validation","validationCode":"# Reuse the duplicate-key checker from index 93; input is in its key list.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["One input key per function; custom layering goes into a single custom codec type.","Let rustfmt/rust-analyzer format attributes so duplicates are visually obvious in diffs."],"tags":["dioxus","proc-macro","server-functions","serialization","macro-args","compile-time"],"backgroundTag":null,"analyzedSha":"393d190a801ccb441d41923e232289b4f8a5c669","analyzedAt":"2026-08-16T11:27:45.815Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}