Title: How to deal with out-of-schema logic · Issue #151 · usethis-python/usethis-python · GitHub
Open Graph Title: How to deal with out-of-schema logic · Issue #151 · usethis-python/usethis-python
X Title: How to deal with out-of-schema logic · Issue #151 · usethis-python/usethis-python
Description: Motivation Some schemas generated by datamodel-codegen allow for non-schema fields to exist. For example, in Bitbucket pipelines, the definitions section is allowed to have any keys. It's not fully obvious what impact this has on the cod...
Open Graph Description: Motivation Some schemas generated by datamodel-codegen allow for non-schema fields to exist. For example, in Bitbucket pipelines, the definitions section is allowed to have any keys. It's not fully...
X Description: Motivation Some schemas generated by datamodel-codegen allow for non-schema fields to exist. For example, in Bitbucket pipelines, the definitions section is allowed to have any keys. It's not f...
Opengraph URL: https://github.com/usethis-python/usethis-python/issues/151
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to deal with out-of-schema logic","articleBody":"**Motivation**\r\nSome schemas generated by `datamodel-codegen` allow for non-schema fields to exist. For example, in Bitbucket pipelines, the definitions section is allowed to have any keys.\r\n\r\nIt's not fully obvious what impact this has on the code, but I suspect it might lead to a case where out-of-schema fields are dropped \"for no reason\". For example, in some cases our approach to modifications is to reconstruct the full file from scratch, but injecting our new element at a specific location. But if, in our traversal, we miss an out-of-schema component, it would just get dropped.\r\n\r\n**Summary of desired enhancement**\r\nTry and find a test case where this behaviour occurs for the two different schemas (pre-commit and bitbucket pipelines) and try to fix the issue if necessary. The fix might require some design considerations.\r\n","author":{"url":"https://github.com/nathanjmcdougall","@type":"Person","name":"nathanjmcdougall"},"datePublished":"2025-01-07T19:23:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/151/usethis-python/issues/151"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1a59c57c-0ef1-a3f4-d065-a323dccdabae |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB2E:3D6334:1414513:1D0244B:6A4CE1AC |
| html-safe-nonce | 7aaa3741fd7e203b88efa55f95696ccf8f66d73ade46f22ab81055887fe126c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjJFOjNENjMzNDoxNDE0NTEzOjFEMDI0NEI6NkE0Q0UxQUMiLCJ2aXNpdG9yX2lkIjoiNTExMjI5NDEyODE5MzY5MjA3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4980256e38eadd381c9cce8f55dd425c01a782680752b92ecdd9390ffd73b295 |
| hovercard-subject-tag | issue:2773571639 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/usethis-python/usethis-python/151/issue_layout |
| twitter:image | https://opengraph.githubassets.com/89451b27e3da0e478027e42b8102212f69805e973a5fef1362a85c9445b8b6cf/usethis-python/usethis-python/issues/151 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/89451b27e3da0e478027e42b8102212f69805e973a5fef1362a85c9445b8b6cf/usethis-python/usethis-python/issues/151 |
| og:image:alt | Motivation Some schemas generated by datamodel-codegen allow for non-schema fields to exist. For example, in Bitbucket pipelines, the definitions section is allowed to have any keys. It's not fully... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nathanjmcdougall |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| turbo-cache-control | no-preview |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c5a57f04eeb310f57c73fd6d751d957e2ca27ed2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width