Skip to content

fix: Include resourceType in Python to_json output #1237

fix: Include resourceType in Python to_json output

fix: Include resourceType in Python to_json output #1237

Triggered via push April 20, 2026 07:48
Status Failure
Total duration 43s
Artifacts 1

ci.yml

on: push
Matrix: package-managers
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 4 warnings
test
Process completed with exit code 1.
error: expect(received).toMatchSnapshot(expected): test/api/write-generator/python.test.ts#L14
@@ -3,11 +3,11 @@ # GitHub: https://github.com/atomic-ehr/codegen # Any manual changes made to this file may be overwritten. from __future__ import annotations from pydantic import BaseModel, ConfigDict, Field, PositiveInt - from typing import List as PyList, Literal + from typing import Any, List as PyList, Literal from fhir_types.hl7_fhir_r4_core.base import (\ Address, Attachment, BackboneElement, CodeableConcept, ContactPoint, HumanName, Identifier, Period, Reference ) from fhir_types.hl7_fhir_r4_core.domain_resource import DomainResource @@ -60,11 +60,13 @@ multiple_birth_boolean: bool | None = Field(None, alias="multipleBirthBoolean", serialization_alias="multipleBirthBoolean") multiple_birth_integer: int | None = Field(None, alias="multipleBirthInteger", serialization_alias="multipleBirthInteger") name: PyList[HumanName] | None = Field(None, alias="name", serialization_alias="name") photo: PyList[Attachment] | None = Field(None, alias="photo", serialization_alias="photo") telecom: PyList[ContactPoint] | None = Field(None, alias="telecom", serialization_alias="telecom") + + def model_post_init(self, __context: Any) -> None: + self.__pydantic_fields_set__.add("resource_type") def to_json(self, indent: int | None = None) -> str: return self.model_dump_json(exclude_unset=True, exclude_none=True, indent=indent) @classmethod - Expected - 1 + Received + 4 at <anonymous> (/home/runner/work/codegen/codegen/test/api/write-generator/python.test.ts:14:80)
build
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/upload-artifact@v5. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
package-managers (bun)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/download-artifact@v5. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
package-managers (npm)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/download-artifact@v5. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
package-managers (pnpm)
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/download-artifact@v5. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Artifacts

Produced during runtime
Name Size Digest
package-tarball Expired
208 KB
sha256:87cbd949c2df62caed27f9470468c47c277c7b92ea9bc97661ff17273fc04472