Title: Add support for requesting OpenAPI schemas by negz · Pull Request #193 · crossplane/function-sdk-python · GitHub
Open Graph Title: Add support for requesting OpenAPI schemas by negz · Pull Request #193 · crossplane/function-sdk-python
X Title: Add support for requesting OpenAPI schemas by negz · Pull Request #193 · crossplane/function-sdk-python
Description: Description of your changes crossplane/crossplane#7022 adds support for composition functions to request OpenAPI schemas for resource kinds. This is useful when a function needs to validate resources against their schema, or introspect what fields a resource kind supports. This PR updates the protobuf definitions and adds SDK helpers: response.require_schema(rsp, name, api_version, kind) - declare a schema requirement request.get_required_schema(req, name) - retrieve the resolved schema as a dict The schema is returned as a plain dict rather than a wrapped type. This keeps the API simple and allows callers to pass it directly to validation libraries like openapi-schema-validator or jsonschema. The docstrings for get_required_resources() and get_required_schema() now explain how to distinguish "not yet resolved" from "resolved but not found" using name in req.required_*. I have: Read and followed Crossplane's contribution process. Added or updated unit tests for my change.
Open Graph Description: Description of your changes crossplane/crossplane#7022 adds support for composition functions to request OpenAPI schemas for resource kinds. This is useful when a function needs to validate resourc...
X Description: Description of your changes crossplane/crossplane#7022 adds support for composition functions to request OpenAPI schemas for resource kinds. This is useful when a function needs to validate resourc...
Opengraph URL: https://github.com/crossplane/function-sdk-python/pull/193
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c33080a1-0928-9db7-c44f-707297be0c82 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9182:330213:AE0C6A:F119D1:6A624DE7 |
| html-safe-nonce | 48dba0c97be9a36d98b68ca500b0a80ff451fd93c574131fcce16f0003f834c5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTgyOjMzMDIxMzpBRTBDNkE6RjExOUQxOjZBNjI0REU3IiwidmlzaXRvcl9pZCI6IjMzNjk2NjA0Nzk4Mzc0NTc4OTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a70c2487bb2e6db9264209c8c78d7344e8db61e728d01800262b4a2e3a6cec2a |
| hovercard-subject-tag | pull_request:3179172785 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/crossplane/function-sdk-python/pull/193/files |
| twitter:image | https://avatars.githubusercontent.com/u/1049349?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1049349?s=400&v=4 |
| og:image:alt | Description of your changes crossplane/crossplane#7022 adds support for composition functions to request OpenAPI schemas for resource kinds. This is useful when a function needs to validate resourc... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 77f5af7d0fa3843b1779a53f60ec016b3f962e46051fb05c2e9b608a8138eefb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/crossplane/function-sdk-python git https://github.com/crossplane/function-sdk-python.git |
| octolytics-dimension-user_id | 45158470 |
| octolytics-dimension-user_login | crossplane |
| octolytics-dimension-repository_id | 721365259 |
| octolytics-dimension-repository_nwo | crossplane/function-sdk-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 721365259 |
| octolytics-dimension-repository_network_root_nwo | crossplane/function-sdk-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d3ce7d369aae307e197872f810f80f3ed9051c78 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width