Skip to content

fix: make service technologies field optional#13

Open
osdakira wants to merge 1 commit intoinstana:mainfrom
osdakira:fix/service-technologies-optional
Open

fix: make service technologies field optional#13
osdakira wants to merge 1 commit intoinstana:mainfrom
osdakira:fix/service-technologies-optional

Conversation

@osdakira
Copy link

Problem

The Service model's technologies field was defined as a required List[StrictStr], but the Instana API can return null for this field. This caused Pydantic validation errors when calling ApplicationAnalyzeApi.get_traces().

Solution

Changed the technologies field to Optional[List[StrictStr]] with default=None to accept null values from the API.

Changes

  • File: instana_client/models/service.py
  • Line 34: Changed from technologies: List[StrictStr] to technologies: Optional[List[StrictStr]] = Field(default=None, ...)

Testing

  • Existing test test/test_service.py passes
  • Consistent with other optional fields in the model (e.g., entity_type)

Fixes #12

@Jayssgss Jayssgss self-requested a review March 13, 2026 02:52
@Jayssgss
Copy link
Collaborator

LGTM!

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.

Pydantic validation error: Service.technologies doesn't accept None from API response

2 participants