feat!: promote required fields on ProfileSummary and add profile versioning - #222
Closed
fern-api[bot] wants to merge 4 commits into
Closed
fern-api[bot] wants to merge 4 commits into
fern-api[bot] wants to merge 4 commits into
Conversation
Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 5.18.1
…nd add profile versioning Several previously-optional fields on `ProfileSummary` and related types are now required (non-Optional), a new `versions` sub-client and `ConflictError` are introduced, and the top-level `lang2fhir_batch` module is exported. The field-type promotions are breaking for callers that construct these models directly or rely on `Optional` typing. Key changes: - `ProfileSummary` fields (`id`, `source`, `resource_type`, `url`, `version`, `fhir_version`, `implementation_guide`, `created_at`, `updated_at`) promoted from `Optional` to required; new fields `status`, `date`, and `canonical` added - `ProfileGetResponse.structure_definition` promoted from `Optional[FhirResource]` to required `FhirResource`; `ProfileListResponse.profiles` promoted from `Optional[List[ProfileSummary]]` to required `List[ProfileSummary]` - New `versions` sub-client (`ProfileVersionCreateRequest`, `ProfileVersionListResponse`) added under `phenoml.profiles` for managing retained profile versions - New `ConflictError` (HTTP 409) raised by `profiles.profiles.update()` when a version conflict is detected - New `lang2fhir_batch` module exported from the top-level `phenoml` package 🌿 Generated with Fern
Patches applied (1): - patch-6516695e: Release 15.0.2: restore bundled openapi.json packaging (#169)
…d12dcfd7d060040d [skip ci]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking: MAJOR because
ProfileSummary,ProfileGetResponse.structure_definition, andProfileListResponse.profileshad fields promoted fromOptionalto required, breaking any existing callers that construct these types without all fields or that guard againstNonevalues.Breaking Changes
ProfileSummary— fieldsid,source,resource_type,url,version,fhir_version,implementation_guide,created_at, andupdated_atare now required (non-Optional); update all construction sites to supply every field and remove anyNone-guard branches.ProfileGetResponse.structure_definition— promoted fromOptional[FhirResource]to a requiredFhirResource; remove anyNoneguard around this field.ProfileListResponse.profiles— promoted fromOptional[List[ProfileSummary]]to a requiredList[ProfileSummary]; remove anyNoneguard around this field.Added
client.lang2fhir_batch— new sync and async sub-client (Lang2FhirBatchClient/RawLang2FhirBatchClient) for managing asynchronous bulk FHIR extraction jobs via/lang2fhir/batch; exposescreate,upload_item,finalize,list,get,get_results, andget_resultmethods.phenoml.lang2fhir_batchmodels and errors — new Pydantic response models (BatchJob,JobListResponse,JobDetailResponse,ResultsPageResponse,UploadItemResponse, and related status types) and eight typedApiErrorsubclasses (e.g.,ConflictError,ContentTooLargeError,GatewayTimeoutError) exported fromphenoml.lang2fhir_batch.client.profiles.versions— new sync and async sub-client for managing immutable StructureDefinition versions on custom profiles; exposeslist,create,get, anddeletemethods backed byProfileVersionListResponseandProfileVersionCreateRequest.ProfileSummary.status,.date, and.canonical— new optional fields surfacing StructureDefinition publication status, authored date, and canonical version-pinned reference.ConflictError(profiles) — new HTTP 409ApiErrorsubclass raised byclient.profiles.profiles.update()and the profile versions endpoints on version conflicts;lang2fhir_batchmodule is now exported from the top-levelphenomlpackage.See full changelog
✅ Customizations automatically preserved in this update.
Note
Medium Risk
Major version bumps required-field changes on profile models can break existing integrations at compile or runtime; new batch and versioning APIs are additive but touch FHIR profile and extraction workflows.
Overview
17.0.0 is a Fern-regenerated SDK bump (
16.11.0→17.0.0) aligned to a newer API spec, with changelog, reference docs, code examples, and replay metadata updated accordingly.Breaking: Several profile response models tighten nullability—
ProfileSummarycore metadata fields,ProfileGetResponse.structure_definition, andProfileListResponse.profilesare now required—so callers must stop treating them as optional and supply or assume non-Nonevalues when building or parsing responses.Added:
PhenomlClient.lang2fhir_batchexposes async bulk FHIR extraction jobs (create,upload_item,finalize,list,get,get_results,get_result) with dedicated Pydantic types and typed HTTP errors underphenoml.lang2fhir_batch.client.profiles.versionsadds list/create/get/delete for immutable StructureDefinition versions, plus optionalProfileSummaryfields (status,date,canonical) and profilesConflictErroron version conflicts.Reviewed by Cursor Bugbot for commit 9720998. Bugbot is set up for automated code reviews on this repo. Configure here.