Skip to content

Correct OpenAPI specifications - #2453

Merged
slifty merged 2 commits into
mainfrom
2451-fix-spec
Jun 12, 2026
Merged

slifty merged 2 commits into
mainfrom
2451-fix-spec

Conversation

@slifty

@slifty slifty commented Jun 12, 2026 •

Copy link
Copy Markdown
Member

There were a series of cases where the OpenAPI specification did not align with our actual implementations.

Some of these were identified by users, others were identified by an audit.

Resolves #2451

There were a series of cases where the OpenAPI specification did not
align with our actual implementations.

Issue #2451 OpenAPI spec deviates from real payload signatures
Copilot AI review requested due to automatic review settings June 12, 2026 15:12
@slifty
slifty requested review from bickelj and hminsky2002 June 12, 2026 15:14
@codecov

codecov Bot commented Jun 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.59%. Comparing base (f10e298) to head (01062e0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2453   +/-   ##
=======================================
  Coverage   93.59%   93.59%           
=======================================
  Files         303      303           
  Lines        3839     3839           
  Branches      517      516    -1     
=======================================
  Hits         3593     3593           
  Misses        245      245           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

🔎 A preview deployment of this pull request is available at https://utilities.philanthropydatacommons.org/pdc-service-preview-2453-dudj4/ (and upstream https://pdc-service-preview-2453-dudj4.ondigitalocean.app) assuming this PR is still open. 🔍

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request corrects several OpenAPI component schemas so the published API specification matches the service’s actual payload shapes (per #2451), improving client generation and validation accuracy.

Changes:

  • Fix incorrect/missing required fields and references across multiple schemas (e.g., Organization.funder, Source.required, ProposalVersion.required, Opportunity.required).
  • Correct schema modeling issues (e.g., BulkUploadTask.logs as an array with items, recursive BulkUploadLogDetails.cause, dynamic PresignedPost.fields via additionalProperties).
  • Add a changelog entry summarizing the OpenAPI-spec alignment fixes.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/openapi/components/schemas/User.json Make keycloakUserName nullable to match actual payloads.
src/openapi/components/schemas/Source.json Remove non-existent relatedEntityId from required.
src/openapi/components/schemas/ProposalVersion.json Require source and createdBy in responses.
src/openapi/components/schemas/PresignedPost.json Allow dynamic S3 POST form fields via additionalProperties.
src/openapi/components/schemas/Organization.json Fix funder schema reference to Funder.
src/openapi/components/schemas/Opportunity.json Require funderShortCode and funder in responses.
src/openapi/components/schemas/FunderCollaborativeInvitation.json Require invitationStatus in responses.
src/openapi/components/schemas/BulkUploadTask.json Fix logs to be an array with items.
src/openapi/components/schemas/BulkUploadLogDetails.json Model recursive cause as a self-reference.
src/openapi/components/schemas/BulkUploadLog.json Reference BulkUploadLogDetails directly for details.
src/openapi/components/schemas/BaseFieldLocalization.json Align nullability/readOnly/required fields with actual payloads.
src/openapi/components/schemas/BaseField.json Fix readOnly keyword spelling for shortCode.
CHANGELOG.md Document the OpenAPI specification corrections under Unreleased.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bickelj bickelj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quickly skimmed the changes here without trying them (for example, in the deploy preview environment) and without comparing to internal types but I see no red flags. This looks like a lot of good corrections, thank you!

I think we want a version increase so the SDK and its users will benefit.

},
"funder": {
"$ref": "./DataProvider.json",
"$ref": "./Funder.json",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zoinks

"type": "string",
"type": ["string", "null"],
"description": "The full name of the user (described in OIDC 1.0 'name' standard claim) as of most recent logged-in service activity.",
"example": "John Doe"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this is readOnly too.

Comment thread CHANGELOG.md

## Unreleased

### Fixed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the SDK is built using the OpenAPI spec it would behoove us to update the version here.

@slifty
slifty enabled auto-merge June 12, 2026 20:01
@slifty
slifty merged commit d9f1da1 into main Jun 12, 2026
23 checks passed
@slifty
slifty deleted the 2451-fix-spec branch June 12, 2026 20:05
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.

OpenAPI spec deviates from real payload signatures

3 participants