Skip to content

feat!: promote required fields on ProfileSummary and add profile versioning - #222

Closed
fern-api[bot] wants to merge 4 commits into
mainfrom
fern-bot/2026-09-04_16-36-20_779
Closed

fern-api[bot] wants to merge 4 commits into
mainfrom
fern-bot/2026-09-04_16-36-20_779

Conversation

@fern-api

@fern-api fern-api Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ 16.11.0 → 17.0.0

Breaking: MAJOR because ProfileSummary, ProfileGetResponse.structure_definition, and ProfileListResponse.profiles had fields promoted from Optional to required, breaking any existing callers that construct these types without all fields or that guard against None values.

Breaking Changes

  • ProfileSummary — fields id, source, resource_type, url, version, fhir_version, implementation_guide, created_at, and updated_at are now required (non-Optional); update all construction sites to supply every field and remove any None-guard branches.
  • ProfileGetResponse.structure_definition — promoted from Optional[FhirResource] to a required FhirResource; remove any None guard around this field.
  • ProfileListResponse.profiles — promoted from Optional[List[ProfileSummary]] to a required List[ProfileSummary]; remove any None guard 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; exposes create, upload_item, finalize, list, get, get_results, and get_result methods.
  • phenoml.lang2fhir_batch models and errors — new Pydantic response models (BatchJob, JobListResponse, JobDetailResponse, ResultsPageResponse, UploadItemResponse, and related status types) and eight typed ApiError subclasses (e.g., ConflictError, ContentTooLargeError, GatewayTimeoutError) exported from phenoml.lang2fhir_batch.
  • client.profiles.versions — new sync and async sub-client for managing immutable StructureDefinition versions on custom profiles; exposes list, create, get, and delete methods backed by ProfileVersionListResponse and ProfileVersionCreateRequest.
  • ProfileSummary.status, .date, and .canonical — new optional fields surfacing StructureDefinition publication status, authored date, and canonical version-pinned reference.
  • ConflictError (profiles) — new HTTP 409 ApiError subclass raised by client.profiles.profiles.update() and the profile versions endpoints on version conflicts; lang2fhir_batch module is now exported from the top-level phenoml package.

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.017.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—ProfileSummary core metadata fields, ProfileGetResponse.structure_definition, and ProfileListResponse.profiles are now required—so callers must stop treating them as optional and supply or assume non-None values when building or parsing responses.

Added: PhenomlClient.lang2fhir_batch exposes async bulk FHIR extraction jobs (create, upload_item, finalize, list, get, get_results, get_result) with dedicated Pydantic types and typed HTTP errors under phenoml.lang2fhir_batch. client.profiles.versions adds list/create/get/delete for immutable StructureDefinition versions, plus optional ProfileSummary fields (status, date, canonical) and profiles ConflictError on version conflicts.

Reviewed by Cursor Bugbot for commit 9720998. Bugbot is set up for automated code reviews on this repo. Configure here.

fern-api Bot and others added 4 commits September 4, 2026 16:36
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)
@gavinsharp gavinsharp closed this Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant