Skip to content

Propagate API DTO into PutApiSpecificationInApim and use base DTO for OpenAPI updates#1

Merged
ametelski merged 1 commit into
mainfrom
codex/investigate-apim-getdto-bug
May 26, 2026
Merged

Propagate API DTO into PutApiSpecificationInApim and use base DTO for OpenAPI updates#1
ametelski merged 1 commit into
mainfrom
codex/investigate-apim-getdto-bug

Conversation

@ametelski
Copy link
Copy Markdown
Owner

Motivation

  • Ensure the APIM put-specification path can reuse the already-available resource DTO instead of re-reading it from APIM when updating API specifications, enabling deterministic updates to the specification properties.

Description

  • Change the PutApiSpecificationInApim delegate signature to accept a JsonObject baseDto parameter and update all resolver and caller sites accordingly.
  • Update ResolvePutApiSpecificationInApim and its putOpenApiSpecification helper to operate on a cloned baseDto and merge the OpenAPI properties.format/properties.value into it instead of fetching the DTO again from APIM.
  • Propagate the DTO through higher-level flows by changing calls to PutApiSpecificationInApim to pass the resource DTO (e.g. in putApi, putSpecification, putSpecification for workspace API, and integration/publisher tests).
  • Adjust tests and test fixtures to match the new delegate signature and ensure callers provide dto where appropriate.

Testing

  • Ran unit tests for the publisher project with dotnet test src/publisher.tests and all tests passed after updates to fixtures and callers.
  • Ran integration tests with dotnet test src/integration.tests and the adjusted test that exercises API specification uploads passed.
  • Verified compilation of the changed projects and that the updated delegate signature is satisfied across production and test code.

Codex Task

@ametelski ametelski merged commit c9f656e into main May 26, 2026
@ametelski ametelski deleted the codex/investigate-apim-getdto-bug branch May 26, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant