{"id":17723542,"url":"https://github.com/doriantaylor/rb-params-registry","last_synced_at":"2025-03-31T13:54:07.581Z","repository":{"id":196148586,"uuid":"693924787","full_name":"doriantaylor/rb-params-registry","owner":"doriantaylor","description":"A registry for named parameters—including, but not limited to URI query parameters—and their validation and serialization criteria.","archived":false,"fork":false,"pushed_at":"2024-02-15T00:00:45.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-18T15:47:55.670Z","etag":null,"topics":["parameter","validation"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doriantaylor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-20T01:47:46.000Z","updated_at":"2023-09-25T21:37:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"41554f76-aabb-4063-af3c-e17f5dba8649","html_url":"https://github.com/doriantaylor/rb-params-registry","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"354e1fd50aadf5e3fc6adf280fad902df56e1c1f"},"previous_names":["doriantaylor/rb-params-registry"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doriantaylor%2Frb-params-registry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doriantaylor%2Frb-params-registry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doriantaylor%2Frb-params-registry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doriantaylor%2Frb-params-registry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doriantaylor","download_url":"https://codeload.github.com/doriantaylor/rb-params-registry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246476987,"owners_count":20783921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["parameter","validation"],"created_at":"2024-10-25T15:43:19.541Z","updated_at":"2025-03-31T13:54:07.574Z","avatar_url":"https://github.com/doriantaylor.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `Params::Registry`: A registry for named parameters\n\nThis module enables an organization to specify a single company-wide\nset of named parameters: their syntax, semantics, cardinalities, type\ncoercions, constraints, conflicts and other interrelationships,\ngroupings, and so on. The goal is to enforce consistency over\n(especially) public-facing parameters and what they mean, promote\nre-use, perform input sanitation and other preprocessing chores, and\ndo consistent, one-to-one, round-trip serialization for things like\nURI query strings.\n\nThe theoretical underpinning for `Params::Registry` is a phenomenon I\ncall [the symbol management\nproblem](https://doriantaylor.com/the-symbol-management-problem),\nnamely that within a given information system, you have a bunch of\n_symbols_, which you have to _manage_, and this is a _problem_.\n`Params::Registry` endeavours to take one category of symbols off the\ntable: named parameters that are exposed to the wild through\nmechanisms like URLs and APIs.\n\n## So, query parameters, isn't that like, _super_ uptight?\n\nI vacillated for _years_ before making [the _first_ version of\nthis module](https://metacpan.org/dist/Params-Registry) back in 2013.\n_Query_ parameters? I mean, who cares? Well, it turns out that if you\nwant certain outcomes, this is the kind of software you need. _What_\noutcomes, you ask?\n\n* Your organization has different parts of its website that use the\n  same parameters to mean the same or similar things.\n* Your organization has different parts of its website that use\n  _different_ parameters to mean the _same_ things.\n* Your organization has _more_ than one website, with non-zero overlap\n  in their respective functionalities.\n* Arbitrary data coming in off the wire (even in something like a\n  URL!) is untrustworthy, so it behooves us to check it.\n* Some parameters may be required, others optional, or they could have\n  complex relationships with each other like dependencies and conflicts.\n* Whatever code that consumes the parameters is turning them into some\n  kind of object (i.e., not just a primitive datatype like a string or\n  integer), potentially combining two or more key-value pairs into\n  composites.\n* Whatever's consuming the parameters may be able to correct if a\n  parameter value is out of bounds (e.g. not in a database), even if\n  it is otherwise valid.\n* You want to be able to issue redirects in the case of recoverable\n  conflicts in the input, and genuinely helpful error messages for the\n  non-recoverable ones.\n\nOkay, all that is pretty uncontroversially useful stuff, but\nrepresents something you could probably hack together on an ad-hoc\nbasis if you really cared. It wouldn't require maintaining an\norganization-wide parameter registry. But how about crazy stuff like:\n\n* What if you wanted to round-trip the parameter sets, so that a given\n  data structure would _always_ serialize—bit for bit—to the same\n  query string, and back again?\n* What if you wanted to gracefully handle name changes for the\n  parameters, and/or translate their names into different languages?\n\nI shouldn't have to spell out the value of these, but the reason why\nyou would care about round-tripping the query string is to lower the\nfootprint out in the wild of URLs that were _different_ lexically but\nidentified the same resource and/or representational state. The reason\nwhy you would care about parameter naming history is to improve user\nexperience—directly and via search engines—by catching otherwise\nbroken links and correcting them (e.g. through a `301` redirect), for\nthe same purpose. The reason why you would want to localize parameter\nnames _should_ be obvious, it just shares its mechanism with the\nnaming history.\n\nIn essence, this module takes a category of symbol that couldn't\nviably be managed in an organization of even _modest_ size, and makes\nit manageable for an organization of _any_ size.\n\n# Contributing\n\nBug reports and pull requests are welcome at\n[the GitHub repository](https://github.com/doriantaylor/rb-params-registry).\n\n# Copyright \u0026 License\n\n©2023 [Dorian Taylor](https://doriantaylor.com/)\n\nThis software is provided under\nthe [Apache License, 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoriantaylor%2Frb-params-registry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoriantaylor%2Frb-params-registry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoriantaylor%2Frb-params-registry/lists"}