Skip to content

fix: restore consumer token response schema#31

Merged
nobodyiam merged 6 commits into
mainfrom
codex/fix-consumer-token-contract
Jun 6, 2026
Merged

fix: restore consumer token response schema#31
nobodyiam merged 6 commits into
mainfrom
codex/fix-consumer-token-contract

Conversation

@nobodyiam

@nobodyiam nobodyiam commented Jun 6, 2026

Copy link
Copy Markdown
Member

Summary

  • add a token-specific OpenConsumerTokenDTO schema for /openapi/v1/consumer-tokens/by-appId
  • keep createConsumer returning OpenConsumerInfoDTO while restoring the consumer token endpoint to token semantics
  • bump generated SDKs and server stubs to 0.3.7

Tests

  • python -m unittest discover tests

Summary by CodeRabbit

  • New Features

    • Release 0.3.7 for Java, Python, TypeScript, Rust, and Spring Boot SDKs; new consumer token DTO added across SDKs.
  • Bug Fixes

    • Restored token-specific response for GET /openapi/v1/consumer-tokens/by-appId.
  • Changes

    • Consumer-list responses now use a more detailed consumer-info DTO.
    • Consumer creation request now requires appId, name, orgId, ownerName; clarified rateLimit semantics.

Copilot AI review requested due to automatic review settings June 6, 2026 07:26
@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Linter diff in the way? Review this PR in Change Stack to focus on meaningful changes and expand context only when needed.

Review Change Stack

Warning

Review limit reached

@nobodyiam, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 8 minutes and 2 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 84375185-7f30-4c74-b32a-64c9d2065b1e

📥 Commits

Reviewing files that changed from the base of the PR and between f9feda0 and 78739ea.

📒 Files selected for processing (18)
  • CHANGELOG.md
  • apollo-openapi.yaml
  • java-client/api/openapi.yaml
  • java-client/docs/OpenConsumerTokenDTO.md
  • java-client/src/main/java/org/openapitools/client/model/OpenConsumerTokenDTO.java
  • java-client/src/test/java/org/openapitools/client/model/OpenConsumerTokenDTOTest.java
  • python/apollo_openapi/model/open_consumer_token_dto.py
  • python/apollo_openapi/model/open_consumer_token_dto.pyi
  • python/docs/models/OpenConsumerCreateRequestDTO.md
  • python/docs/models/OpenConsumerTokenDTO.md
  • rust/docs/OpenConsumerCreateRequestDto.md
  • rust/docs/OpenConsumerTokenDto.md
  • rust/src/models/open_consumer_token_dto.rs
  • spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiDelegate.java
  • spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerTokenDTO.java
  • spring-boot2/src/main/resources/openapi.yaml
  • tests/test_user_management_contract.py
  • typescript/src/models/OpenConsumerTokenDTO.ts
📝 Walkthrough

Walkthrough

This PR bumps Apollo OpenAPI from version 0.3.6 to 0.3.7 and introduces OpenConsumerTokenDTO as the response schema for the /openapi/v1/consumer-tokens/by-appId endpoint, replacing OpenConsumerInfoDTO. The change regenerates all SDK models (Java, Python, Rust, Spring Boot 2, TypeScript) with corresponding API method updates and test coverage.

Changes

OpenAPI specification, core schema, and version updates

Layer / File(s) Summary
OpenAPI schema definition and documentation
apollo-openapi.yaml, CHANGELOG.md, tests/test_user_management_contract.py
Core OpenAPI spec introduces new OpenConsumerTokenDTO schema under components.schemas with token, consumer, rate limit, expiry, and audit fields; endpoint response schema switches from OpenConsumerInfoDTO to OpenConsumerTokenDTO; CHANGELOG and test contract updated to document the change.
Version and generation configuration
generate.sh
Version bumped from 0.3.6 to 0.3.7 across Python, TypeScript, Java, Spring Boot 2, and Rust SDK generation invocations via --additional-properties packageVersion=0.3.7.

Java client SDK

Layer / File(s) Summary
Java client OpenAPI spec and model generation artifacts
java-client/api/openapi.yaml, java-client/.openapi-generator/FILES
Java client OpenAPI spec updated to version 0.3.7; endpoint response type changed to OpenConsumerTokenDTO; new schema definition added; generation manifest lists new docs, model, and test files for OpenConsumerTokenDTO.
Java OpenConsumerTokenDTO model and API integration
java-client/src/main/java/org/openapitools/client/model/OpenConsumerTokenDTO.java, java-client/src/main/java/org/openapitools/client/api/PortalManagementApi.java, java-client/src/main/java/org/openapitools/client/JSON.java, java-client/src/main/java/org/openapitools/client/Configuration.java
New OpenConsumerTokenDTO model class with fluent setters, getters, validation, and JSON type adapter factory; PortalManagementApi methods updated to return/deserialize OpenConsumerTokenDTO; Gson JSON handler and Configuration.VERSION constant updated.
Java client tests, documentation, and build updates
java-client/src/test/java/.../OpenConsumerTokenDTOTest.java, java-client/docs/..., java-client/README.md, java-client/pom.xml, java-client/build.gradle, java-client/build.sbt
Generated test class and documentation for OpenConsumerTokenDTO; PortalManagementApi test updated to use new DTO type; version bumped to 0.3.7 in Maven, Gradle, SBT build files and README with dependency examples.

Python SDK

Layer / File(s) Summary
Python OpenConsumerTokenDTO model and schema integration
python/apollo_openapi/model/open_consumer_token_dto.py, python/apollo_openapi/model/open_consumer_token_dto.pyi, python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.py, python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.pyi, python/apollo_openapi/models/__init__.py
New OpenConsumerTokenDTO model implementation (.py and .pyi stub) with DictSchema base, typed property accessors, and constructor; consumer-tokens endpoint handler switched to import and deserialize using OpenConsumerTokenDTO schema.
Python tests, documentation, and package updates
python/test/test_models/test_open_consumer_token_dto.py, python/docs/models/OpenConsumerTokenDTO.md, python/docs/apis/tags/PortalManagementApi.md, python/apollo_openapi/__init__.py, python/apollo_openapi/api_client.py, python/apollo_openapi/configuration.py, python/setup.py, python/README.md, python/.openapi-generator/FILES
Generated test module stub, model documentation, and API docs for endpoints returning OpenConsumerTokenDTO; package exports added; version updated to 0.3.7 in __init__.py, api_client.py, configuration.py, and setup.py; README and generator manifest reflect new model.

Spring Boot 2 server

Layer / File(s) Summary
Spring Boot 2 OpenAPI spec and OpenConsumerTokenDTO model
spring-boot2/src/main/resources/openapi.yaml, spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerTokenDTO.java, spring-boot2/.openapi-generator/FILES
Server OpenAPI spec updated to version 0.3.7 with new OpenConsumerTokenDTO schema and endpoint response type; new OpenConsumerTokenDTO Java model class with Spring/Jackson annotations, fluent setters, and validation decorators (@Min(0) for rateLimit); generation manifest includes new model file.
Spring Boot 2 API interface and delegate updates
spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApi.java, spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiDelegate.java, spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiController.java, spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java, spring-boot2/pom.xml
PortalManagementApi interface and delegate methods updated to return ResponseEntity<OpenConsumerTokenDTO>; example response JSON updated to token DTO format; controller import added; SpringDocConfiguration version updated to 0.3.7; Maven version bumped to 0.3.7.

Rust SDK

Layer / File(s) Summary
Rust OpenConsumerTokenDto model and configuration
rust/src/models/open_consumer_token_dto.rs, rust/src/models/mod.rs, rust/Cargo.toml, rust/src/apis/configuration.rs, rust/README.md, rust/docs/OpenConsumerTokenDto.md, rust/.openapi-generator/FILES
New OpenConsumerTokenDto struct with optional fields and serde serialization mappings; module exports updated to include and re-export new type; version bumped to 0.3.7 in Cargo.toml and default user_agent; documentation page and generator manifest reflect new model.

TypeScript SDK

Layer / File(s) Summary
TypeScript OpenConsumerTokenDTO model and API integration
typescript/src/models/OpenConsumerTokenDTO.ts, typescript/src/models/index.ts, typescript/src/apis/PortalManagementApi.ts
New OpenConsumerTokenDTO interface with optional token and audit fields; JSON conversion utilities added (FromJSON, FromJSONTyped, ToJSON); PortalManagementApi imports and uses new DTO for consumer token endpoints; model barrel export added.
TypeScript package and documentation updates
typescript/package.json, typescript/README.md, typescript/.openapi-generator/FILES
Package version bumped to 0.3.7; README updated with new version and npm installation examples; generator manifest reflects new model file.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • hezhangjian

Poem

🐰 With whiskers twitched and nose so keen,
We've bundled tokens clean and lean—
From Info old to Token new,
Through seven SDKs, we've pulled you through.
Version bumped to point-seven's cheer,
Schema's fresh, the path is clear! 🌟

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-consumer-token-contract

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

Restores the /openapi/v1/consumer-tokens/by-appId endpoint to return a token-specific schema (OpenConsumerTokenDTO) instead of reusing the broader consumer-info schema, and regenerates/bump-pins all published artifacts to version 0.3.7 across the OpenAPI spec, server stubs, and SDKs.

Changes:

  • Introduce OpenConsumerTokenDTO schema and update /openapi/v1/consumer-tokens/by-appId response type to use it.
  • Regenerate TypeScript, Python, Java client, Spring Boot server, and Rust artifacts to include the new model and updated endpoint types.
  • Bump package/spec versions and generator metadata from 0.3.60.3.7.

Reviewed changes

Copilot reviewed 54 out of 54 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
typescript/src/models/OpenConsumerTokenDTO.ts Adds TS model for the token-specific response payload.
typescript/src/models/index.ts Exports the new TS model from the models barrel.
typescript/src/apis/PortalManagementApi.ts Updates TS client method return type to OpenConsumerTokenDTO.
typescript/README.md Bumps TS package version references to 0.3.7.
typescript/package.json Bumps TS package version to 0.3.7.
typescript/.openapi-generator/FILES Registers the newly generated TS model file.
tests/test_user_management_contract.py Updates contract assertions to require OpenConsumerTokenDTO and validates key fields.
spring-boot2/src/main/resources/openapi.yaml Bumps spec version and switches endpoint schema ref to OpenConsumerTokenDTO; adds schema definition.
spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerTokenDTO.java Adds Spring server model for OpenConsumerTokenDTO (with token redaction in toString).
spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java Bumps published OpenAPI version string to 0.3.7.
spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiDelegate.java Updates delegate signature and example payload to token DTO shape.
spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiController.java Updates controller imports/types to include token DTO.
spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApi.java Updates API interface response schema/type to token DTO.
spring-boot2/pom.xml Bumps Spring server artifact version to 0.3.7.
spring-boot2/.openapi-generator/FILES Registers the newly generated Spring server model file.
rust/src/models/open_consumer_token_dto.rs Adds Rust model for token DTO.
rust/src/models/mod.rs Exposes token DTO from Rust models module.
rust/src/apis/configuration.rs Bumps Rust client user-agent/version metadata to 0.3.7.
rust/README.md Bumps Rust package/API version metadata and lists the new model.
rust/docs/OpenConsumerTokenDto.md Adds Rust model documentation for token DTO.
rust/Cargo.toml Bumps Rust crate version to 0.3.7.
rust/.openapi-generator/FILES Registers new Rust model + docs.
python/test/test_models/test_open_consumer_token_dto.py Adds generated Python model test stub for token DTO.
python/setup.py Bumps Python package version to 0.3.7.
python/README.md Bumps Python package/API version metadata and lists the new model.
python/docs/models/OpenConsumerTokenDTO.md Adds Python model documentation for token DTO.
python/docs/apis/tags/PortalManagementApi.md Updates Python API docs to show token endpoint returning OpenConsumerTokenDTO.
python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.pyi Updates typed stub to use OpenConsumerTokenDTO for 200 response.
python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.py Updates runtime path definition to use OpenConsumerTokenDTO for 200 response.
python/apollo_openapi/models/__init__.py Exposes token DTO model from Python models package.
python/apollo_openapi/model/open_consumer_token_dto.pyi Adds Python type stub for token DTO.
python/apollo_openapi/model/open_consumer_token_dto.py Adds Python model implementation for token DTO.
python/apollo_openapi/configuration.py Bumps Python debug report metadata to 0.3.7.
python/apollo_openapi/api_client.py Bumps Python user-agent to 0.3.7.
python/apollo_openapi/__init__.py Bumps Python package __version__ to 0.3.7.
python/.openapi-generator/FILES Registers new Python model + docs + test stub.
java-client/src/test/java/org/openapitools/client/model/OpenConsumerTokenDTOTest.java Adds generated Java client model test stub for token DTO.
java-client/src/test/java/org/openapitools/client/api/PortalManagementApiTest.java Updates Java client API test to expect OpenConsumerTokenDTO.
java-client/src/main/java/org/openapitools/client/model/OpenConsumerTokenDTO.java Adds Java client model for token DTO (with JSON validation + token redaction in toString).
java-client/src/main/java/org/openapitools/client/JSON.java Registers the new Java model type adapter factory.
java-client/src/main/java/org/openapitools/client/Configuration.java Bumps Java client VERSION constant to 0.3.7.
java-client/src/main/java/org/openapitools/client/ApiClient.java Bumps Java user-agent to 0.3.7.
java-client/src/main/java/org/openapitools/client/api/PortalManagementApi.java Updates Java client endpoint return types to OpenConsumerTokenDTO.
java-client/README.md Bumps Java client documentation version references and lists the new model.
java-client/pom.xml Bumps Java client artifact version to 0.3.7.
java-client/docs/PortalManagementApi.md Updates Java client API docs to show token endpoint returning OpenConsumerTokenDTO.
java-client/docs/OpenConsumerTokenDTO.md Adds Java client model documentation for token DTO.
java-client/build.sbt Bumps Java client SBT version to 0.3.7.
java-client/build.gradle Bumps Java client Gradle version to 0.3.7.
java-client/api/openapi.yaml Bumps Java-client bundled spec version and switches endpoint schema ref to token DTO; adds schema.
java-client/.openapi-generator/FILES Registers new Java client model + docs + test stub.
generate.sh Bumps generator packageVersion/npmVersion/artifactVersion/user_agent inputs to 0.3.7.
CHANGELOG.md Adds a “Fixed” entry describing restoring token endpoint schema.
apollo-openapi.yaml Bumps core spec version to 0.3.7, switches endpoint response schema ref, and adds OpenConsumerTokenDTO to components.

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

Comment on lines +6 to +10
import com.fasterxml.jackson.annotation.JsonCreator;
import java.time.OffsetDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import org.openapitools.jackson.nullable.JsonNullable;
import java.time.OffsetDateTime;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 78739ea. The generated Spring Boot model now has a single java.time.OffsetDateTime import; python -m unittest discover tests and git diff --check both pass.

Comment thread CHANGELOG.md
Comment on lines 8 to 20
## [Unreleased]

### Changed

- Rename Portal user management contracts from `Portal User Management` to `User Management`.

### Fixed

- Restore `/openapi/v1/consumer-tokens/by-appId` to a token-specific response schema.

### Added

- Add Consumer Token support notes to user management contracts, including `ManageUsers`-guarded user lookup and mutation operations.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Keeping this entry under [Unreleased] is intentional for the PR stage. The OpenAPI spec and generated SDK artifacts are bumped to 0.3.7 so the release artifacts have the right version, while the changelog still tracks unreleased PR contents until the release is cut. The release prep can move these entries into a 0.3.7 section/release notes.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🧹 Nitpick comments (5)
java-client/src/test/java/org/openapitools/client/model/OpenConsumerTokenDTOTest.java (1)

35-126: ⚡ Quick win

Generated tests are currently no-op

All added @Test methods contain TODOs only, so they don’t validate OpenConsumerTokenDTO behavior and won’t catch regressions in the new token contract. Please add at least one assertion-based roundtrip test covering token, expiry, rate-limit, and audit fields.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@java-client/src/test/java/org/openapitools/client/model/OpenConsumerTokenDTOTest.java`
around lines 35 - 126, Replace the no-op tests in OpenConsumerTokenDTOTest with
an assertion-based roundtrip test that constructs an OpenConsumerTokenDTO
instance (set fields token, expires, rateLimit, consumerId, id, deleted,
deletedAt, dataChangeCreatedBy, dataChangeCreatedTime, dataChangeLastModifiedBy,
dataChangeLastModifiedTime), serializes and deserializes it (or copies via
getters/setters) and asserts equality/field-by-field matches for token, expires,
rateLimit and the audit fields; update the testOpenConsumerTokenDTO() method to
perform this full-coverage assertion sequence and remove the TODOs in the
individual property test methods (or implement similar assertions there) so the
test verifies the DTO's roundtrip integrity and catches regressions.
spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerTokenDTO.java (2)

7-10: ⚡ Quick win

Remove duplicate import.

OffsetDateTime is imported twice (lines 7 and 10).

🧹 Proposed fix
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonCreator;
 import java.time.OffsetDateTime;
 import org.springframework.format.annotation.DateTimeFormat;
 import org.openapitools.jackson.nullable.JsonNullable;
-import java.time.OffsetDateTime;
 import javax.validation.Valid;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerTokenDTO.java`
around lines 7 - 10, The import list in OpenConsumerTokenDTO includes a
duplicate import of OffsetDateTime; remove the redundant OffsetDateTime import
so only one import java.time.OffsetDateTime; remains, leaving the other imports
(org.springframework.format.annotation.DateTimeFormat and
org.openapitools.jackson.nullable.JsonNullable) intact and ensuring the class
compiles without duplicate imports.

30-30: ⚡ Quick win

Use uppercase 'L' suffix for long literals.

The lowercase 'l' can be confused with the digit '1'. Use 0L instead of 0l for clarity.

📝 Proposed fix
-  private Long deletedAt = 0l;
+  private Long deletedAt = 0L;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerTokenDTO.java`
at line 30, Replace the lowercase long literal used to initialize the field
deletedAt in class OpenConsumerTokenDTO: change the initializer for the field
symbol deletedAt from 0l to 0L to avoid confusion with the digit '1' and follow
Java convention for long literals.
rust/src/models/open_consumer_token_dto.rs (1)

50-66: ⚡ Quick win

Redundant constructor with Default derive.

The struct derives Default on line 13, which automatically provides a default() method that initializes all Option fields to None. The manual new() implementation duplicates this behavior.

♻️ Proposed fix: Remove the redundant constructor

Since Default is derived, users can call OpenConsumerTokenDto::default() or use the struct update syntax. The new() method can be removed:

-impl OpenConsumerTokenDto {
-    pub fn new() -> OpenConsumerTokenDto {
-        OpenConsumerTokenDto {
-            id: None,
-            deleted: None,
-            deleted_at: None,
-            consumer_id: None,
-            token: None,
-            rate_limit: None,
-            expires: None,
-            data_change_created_by: None,
-            data_change_created_time: None,
-            data_change_last_modified_by: None,
-            data_change_last_modified_time: None,
-        }
-    }
-}

Alternatively, if the new() pattern is preferred by the generator, remove the Default derive from line 13.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@rust/src/models/open_consumer_token_dto.rs` around lines 50 - 66, The impl
OpenConsumerTokenDto::new() duplicates behavior already provided by the derived
Default for OpenConsumerTokenDto; remove the manual new() constructor to avoid
redundancy and rely on OpenConsumerTokenDto::default() (or keep new() and
instead remove the Default derive if you prefer the explicit constructor
pattern). Update any call sites to use OpenConsumerTokenDto::default() if you
remove new().
python/test/test_models/test_open_consumer_token_dto.py (1)

18-20: 🏗️ Heavy lift

Consider adding test methods for the new DTO.

The test class is currently a stub with no test methods. While this is standard OpenAPI generator output, adding tests for serialization, deserialization, and field validation would improve coverage for the new OpenConsumerTokenDTO model.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@python/test/test_models/test_open_consumer_token_dto.py` around lines 18 -
20, Add concrete unit tests to replace the stub TestOpenConsumerTokenDTO class
by implementing tests that cover serialization, deserialization, and basic field
validation for the OpenConsumerTokenDTO model: create test methods named
test_serialization_to_dict, test_deserialization_from_dict, and
test_field_validation that construct an OpenConsumerTokenDTO with representative
values, assert that .to_dict() (or equivalent) produces expected keys/values,
recreate the model from that dict and assert equality, and verify
required/optional fields behave as expected (e.g., missing required fields raise
or default correctly) using the OpenConsumerTokenDTO class referenced in the
test file.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@python/docs/apis/tags/PortalManagementApi.md`:
- Line 3094: The response-schema table row for the operation
get_consumer_token_by_app_id (OpenConsumerTokenDTO) is malformed with fewer
pipe-separated cells than the table header; update the table row in
PortalManagementApi.md for get_consumer_token_by_app_id so it has the same
number of columns as the header (add the missing cell(s) such as response type,
status code or description as appropriate) and ensure each cell is separated by
"|" to restore proper Markdown table rendering.

In `@python/docs/models/OpenConsumerTokenDTO.md`:
- Line 13: The documentation line for the OpenConsumerTokenDTO field deletedAt
has a formatting issue ("0value must be a 64 bit integer"); update the deletedAt
description in OpenConsumerTokenDTO so it reads with proper punctuation and
spacing (e.g., "if omitted the server will use the default value of 0; value
must be a 64 bit integer" or "if omitted the server will use the default value
of 0. Value must be a 64-bit integer") ensuring the field name deletedAt and the
DTO OpenConsumerTokenDTO remain unchanged.

In `@spring-boot2/src/main/resources/openapi.yaml`:
- Around line 8858-8860: The OpenAPI schema for the property named "token"
currently declares it as type: string but must allow explicit nulls; update the
"token" property definition in openapi.yaml to include nullable: true (i.e., set
token: { type: string, nullable: true }) so generated SDKs match the service
behavior when the token is redacted/serialized as null; ensure you update the
same "token" schema instance referenced by any components/schemas that define
this field.

---

Nitpick comments:
In
`@java-client/src/test/java/org/openapitools/client/model/OpenConsumerTokenDTOTest.java`:
- Around line 35-126: Replace the no-op tests in OpenConsumerTokenDTOTest with
an assertion-based roundtrip test that constructs an OpenConsumerTokenDTO
instance (set fields token, expires, rateLimit, consumerId, id, deleted,
deletedAt, dataChangeCreatedBy, dataChangeCreatedTime, dataChangeLastModifiedBy,
dataChangeLastModifiedTime), serializes and deserializes it (or copies via
getters/setters) and asserts equality/field-by-field matches for token, expires,
rateLimit and the audit fields; update the testOpenConsumerTokenDTO() method to
perform this full-coverage assertion sequence and remove the TODOs in the
individual property test methods (or implement similar assertions there) so the
test verifies the DTO's roundtrip integrity and catches regressions.

In `@python/test/test_models/test_open_consumer_token_dto.py`:
- Around line 18-20: Add concrete unit tests to replace the stub
TestOpenConsumerTokenDTO class by implementing tests that cover serialization,
deserialization, and basic field validation for the OpenConsumerTokenDTO model:
create test methods named test_serialization_to_dict,
test_deserialization_from_dict, and test_field_validation that construct an
OpenConsumerTokenDTO with representative values, assert that .to_dict() (or
equivalent) produces expected keys/values, recreate the model from that dict and
assert equality, and verify required/optional fields behave as expected (e.g.,
missing required fields raise or default correctly) using the
OpenConsumerTokenDTO class referenced in the test file.

In `@rust/src/models/open_consumer_token_dto.rs`:
- Around line 50-66: The impl OpenConsumerTokenDto::new() duplicates behavior
already provided by the derived Default for OpenConsumerTokenDto; remove the
manual new() constructor to avoid redundancy and rely on
OpenConsumerTokenDto::default() (or keep new() and instead remove the Default
derive if you prefer the explicit constructor pattern). Update any call sites to
use OpenConsumerTokenDto::default() if you remove new().

In
`@spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerTokenDTO.java`:
- Around line 7-10: The import list in OpenConsumerTokenDTO includes a duplicate
import of OffsetDateTime; remove the redundant OffsetDateTime import so only one
import java.time.OffsetDateTime; remains, leaving the other imports
(org.springframework.format.annotation.DateTimeFormat and
org.openapitools.jackson.nullable.JsonNullable) intact and ensuring the class
compiles without duplicate imports.
- Line 30: Replace the lowercase long literal used to initialize the field
deletedAt in class OpenConsumerTokenDTO: change the initializer for the field
symbol deletedAt from 0l to 0L to avoid confusion with the digit '1' and follow
Java convention for long literals.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e9157ee6-4949-413f-b5a3-4ea3e6f03313

📥 Commits

Reviewing files that changed from the base of the PR and between bf5f056 and 1d1d582.

📒 Files selected for processing (54)
  • CHANGELOG.md
  • apollo-openapi.yaml
  • generate.sh
  • java-client/.openapi-generator/FILES
  • java-client/README.md
  • java-client/api/openapi.yaml
  • java-client/build.gradle
  • java-client/build.sbt
  • java-client/docs/OpenConsumerTokenDTO.md
  • java-client/docs/PortalManagementApi.md
  • java-client/pom.xml
  • java-client/src/main/java/org/openapitools/client/ApiClient.java
  • java-client/src/main/java/org/openapitools/client/Configuration.java
  • java-client/src/main/java/org/openapitools/client/JSON.java
  • java-client/src/main/java/org/openapitools/client/api/PortalManagementApi.java
  • java-client/src/main/java/org/openapitools/client/model/OpenConsumerTokenDTO.java
  • java-client/src/test/java/org/openapitools/client/api/PortalManagementApiTest.java
  • java-client/src/test/java/org/openapitools/client/model/OpenConsumerTokenDTOTest.java
  • python/.openapi-generator/FILES
  • python/README.md
  • python/apollo_openapi/__init__.py
  • python/apollo_openapi/api_client.py
  • python/apollo_openapi/configuration.py
  • python/apollo_openapi/model/open_consumer_token_dto.py
  • python/apollo_openapi/model/open_consumer_token_dto.pyi
  • python/apollo_openapi/models/__init__.py
  • python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.py
  • python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.pyi
  • python/docs/apis/tags/PortalManagementApi.md
  • python/docs/models/OpenConsumerTokenDTO.md
  • python/setup.py
  • python/test/test_models/test_open_consumer_token_dto.py
  • rust/.openapi-generator/FILES
  • rust/Cargo.toml
  • rust/README.md
  • rust/docs/OpenConsumerTokenDto.md
  • rust/src/apis/configuration.rs
  • rust/src/models/mod.rs
  • rust/src/models/open_consumer_token_dto.rs
  • spring-boot2/.openapi-generator/FILES
  • spring-boot2/pom.xml
  • spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApi.java
  • spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiController.java
  • spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiDelegate.java
  • spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java
  • spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerTokenDTO.java
  • spring-boot2/src/main/resources/openapi.yaml
  • tests/test_user_management_contract.py
  • typescript/.openapi-generator/FILES
  • typescript/README.md
  • typescript/package.json
  • typescript/src/apis/PortalManagementApi.ts
  • typescript/src/models/OpenConsumerTokenDTO.ts
  • typescript/src/models/index.ts

Comment thread python/docs/apis/tags/PortalManagementApi.md
Comment thread python/docs/models/OpenConsumerTokenDTO.md Outdated
Comment thread spring-boot2/src/main/resources/openapi.yaml

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
apollo-openapi.yaml (1)

6864-6871: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Enforce rateLimitEnabled/rateLimit dependency in schema, not only description.

Line 6870 documents “must be > 0 when enabled”, but current schema still permits rateLimitEnabled: true with rateLimit: 0. This weakens request-contract validation across generated SDK/server validators.

💡 Suggested OpenAPI constraint shape
     OpenConsumerCreateRequestDTO:
       type: object
       required:
         - appId
         - name
         - orgId
         - ownerName
+      oneOf:
+        - properties:
+            rateLimitEnabled:
+              enum: [false]
+        - required:
+            - rateLimit
+          properties:
+            rateLimitEnabled:
+              enum: [true]
+            rateLimit:
+              type: integer
+              minimum: 1
       properties:
         appId:
           type: string
@@
         rateLimit:
           type: integer
           description: 限流QPS,rateLimitEnabled 为 true 时必须大于 0;未开启限流时 0 表示不限流
           minimum: 0
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apollo-openapi.yaml` around lines 6864 - 6871, The schema currently allows
rateLimitEnabled: true with rateLimit: 0; update the OpenAPI schema for the
object containing rateLimitEnabled and rateLimit to enforce the dependency by
adding a conditional (use oneOf or if/then) such that when rateLimitEnabled is
true the schema requires rateLimit and constrains it to minimum: 1, and when
rateLimitEnabled is false (or absent) rateLimit can be 0 (or >=0); target the
properties named rateLimitEnabled and rateLimit and add the conditional blocks
(e.g., an if: {properties:{rateLimitEnabled:{const:true}}} then:
{required:["rateLimit"], properties:{rateLimit:{minimum:1}}} else:
{properties:{rateLimit:{minimum:0}}}) to ensure validation matches the
documented rule.
java-client/src/main/java/org/openapitools/client/model/OpenConsumerCreateRequestDTO.java (1)

90-104: ⚠️ Potential issue | 🟠 Major

Fix unsound @javax.annotation.Nonnull on DTO getters when a public no-arg constructor allows nulls

OpenConsumerCreateRequestDTO has a public no-arg constructor, and required String fields (appId, name, orgId, ownerName) are not initialized; the @javax.annotation.Nonnull getters can therefore return null when called on a directly-instantiated object (e.g., getAppId at lines 103-106; also getName 166-169, getOrgId 187-190, getOwnerName 229-232). Either make construction impossible without required fields (or remove/limit the no-arg constructor) or mark these getters @Nullable and enforce requiredness via validation when building/deserializing the request.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@java-client/src/main/java/org/openapitools/client/model/OpenConsumerCreateRequestDTO.java`
around lines 90 - 104, OpenConsumerCreateRequestDTO currently exposes a public
no-arg constructor while its required String getters (getAppId, getName,
getOrgId, getOwnerName) are annotated `@javax.annotation.Nonnull` which is unsound
because those fields can remain null; either remove or restrict the public
no-arg constructor (make it private/protected or provide a builder/constructor
that requires appId/name/orgId/ownerName) so instances cannot be created with
null required fields, or alternatively change those getters to `@Nullable` and add
runtime validation (e.g., in a validate() method or in the builder/deserializer)
to enforce presence; update the class accordingly and keep annotations
consistent with the new construction/validation approach.
spring-boot2/src/main/resources/openapi.yaml (1)

6456-6460: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Refresh the OpenConsumerInfoDTO.token description after this endpoint split.

After Line 6460 switches /openapi/v1/consumer-tokens/by-appId to OpenConsumerTokenDTO, the token field docs in OpenConsumerInfoDTO at Lines 8756-8758 still say it is returned for “按应用查询详情”. That wording is now stale and will flow into generated docs/SDK docs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@spring-boot2/src/main/resources/openapi.yaml` around lines 6456 - 6460,
Update the OpenConsumerInfoDTO.token description to remove the stale phrase
"按应用查询详情" and reflect the current behavior after the endpoint split where
/openapi/v1/consumer-tokens/by-appId now returns OpenConsumerTokenDTO;
specifically edit the token field description in the OpenConsumerInfoDTO schema
(symbol: OpenConsumerInfoDTO.token) to either a neutral description of the token
value or to state the correct endpoint(s) that return it, and ensure consistency
with OpenConsumerTokenDTO's documentation.
♻️ Duplicate comments (1)
python/docs/apis/tags/PortalManagementApi.md (1)

3084-3084: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix malformed DTO table row and unresolved model links

Line 3084 is missing one table cell for the 5-column header and still uses {{complexTypePrefix}}, which leaves broken links in rendered docs.

Suggested fix
-[**OpenConsumerInfoDTO**]({{complexTypePrefix}}OpenConsumerInfoDTO.md) | [**OpenConsumerInfoDTO**]({{complexTypePrefix}}OpenConsumerInfoDTO.md) | [**OpenConsumerInfoDTO**]({{complexTypePrefix}}OpenConsumerInfoDTO.md) |  |
+[**OpenConsumerInfoDTO**](../../models/OpenConsumerInfoDTO.md) | [**OpenConsumerInfoDTO**](../../models/OpenConsumerInfoDTO.md) | [**OpenConsumerInfoDTO**](../../models/OpenConsumerInfoDTO.md) |  |  |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@python/docs/apis/tags/PortalManagementApi.md` at line 3084, The Markdown
table row for OpenConsumerInfoDTO in PortalManagementApi.md is malformed (it has
only four cells for a five-column header) and uses the unresolved token
{{complexTypePrefix}}; update the row for OpenConsumerInfoDTO to include the
missing fifth cell (e.g., an appropriate description or placeholder) and replace
the `{{complexTypePrefix}}OpenConsumerInfoDTO.md` links with the correct
relative/absolute link target (or plain filename) so the three link cells point
to a valid OpenConsumerInfoDTO doc; locate the row containing
OpenConsumerInfoDTO to make these edits.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@java-client/api/openapi.yaml`:
- Around line 8434-8435: The OpenAPI schema currently allows rateLimit to be 0
or omitted even when rateLimitEnabled is true; update
java-client/api/openapi.yaml to make rateLimit required and >0 when
rateLimitEnabled is true by adding a conditional schema (use an if: {
properties: { rateLimitEnabled: { const: true } } } then: { required:
["rateLimit"], properties: { rateLimit: { minimum: 1 } } }) or alternatively
model the two branches with oneOf (enabled branch requires rateLimit with
minimum 1, disabled branch allows rateLimit = 0 or omitted); this will produce
generated Spring DTOs with the necessary `@NotNull/`@Min(1) constraints.

In `@python/docs/models/OpenConsumerCreateRequestDTO.md`:
- Around line 11-14: The table rows for the fields ownerName, appId, name, and
orgId are malformed because the 5-column Markdown table is missing the Notes
column; update each row in OpenConsumerCreateRequestDTO.md to include a Notes
entry such as "[required]" so each row has five columns (e.g., ensure the lines
defining **ownerName**, **appId**, **name**, **orgId** each end with a Notes
cell like `[required]`) to restore correct table rendering.

In `@rust/docs/OpenConsumerCreateRequestDto.md`:
- Around line 7-13: The markdown table rows for required fields app_id, name,
org_id, and owner_name are missing the Notes column and break the 4-column
format; update the table entries for these identifiers (app_id, name, org_id,
owner_name) to include an explicit Notes value such as "[required]" so every row
has four columns (Field | Type | Description | Notes) and the table remains
consistent.

In
`@spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerCreateRequestDTO.java`:
- Around line 227-233: The current validation on OpenConsumerCreateRequestDTO
only applies `@Min`(0) to the rateLimit field, allowing rateLimit=0 when
rateLimitEnabled is true; add conditional validation so that if the boolean
field rateLimitEnabled is true then rateLimit must be > 0. Implement this by
adding either a class-level custom constraint (or an `@AssertTrue` validator
method) on OpenConsumerCreateRequestDTO that checks rateLimitEnabled and
rateLimit and returns false when rateLimitEnabled==true and rateLimit<=0, and
update the validation message accordingly to reflect the invariant.

In `@spring-boot2/src/main/resources/openapi.yaml`:
- Around line 8710-8717: The schema currently allows rateLimit: 0 even when
rateLimitEnabled is true; update the OpenAPI schema for the object containing
rateLimit and rateLimitEnabled to explicitly encode the invariant (e.g., use
oneOf with two variants: one where rateLimitEnabled: true and rateLimit has
minimum: 1, and another where rateLimitEnabled: false and rateLimit has minimum:
0) so generated SDKs cannot accept {rateLimitEnabled: true, rateLimit: 0};
target the schema that defines the properties rateLimitEnabled and rateLimit and
add the oneOf constraint referencing those property sets.

---

Outside diff comments:
In `@apollo-openapi.yaml`:
- Around line 6864-6871: The schema currently allows rateLimitEnabled: true with
rateLimit: 0; update the OpenAPI schema for the object containing
rateLimitEnabled and rateLimit to enforce the dependency by adding a conditional
(use oneOf or if/then) such that when rateLimitEnabled is true the schema
requires rateLimit and constrains it to minimum: 1, and when rateLimitEnabled is
false (or absent) rateLimit can be 0 (or >=0); target the properties named
rateLimitEnabled and rateLimit and add the conditional blocks (e.g., an if:
{properties:{rateLimitEnabled:{const:true}}} then: {required:["rateLimit"],
properties:{rateLimit:{minimum:1}}} else: {properties:{rateLimit:{minimum:0}}})
to ensure validation matches the documented rule.

In
`@java-client/src/main/java/org/openapitools/client/model/OpenConsumerCreateRequestDTO.java`:
- Around line 90-104: OpenConsumerCreateRequestDTO currently exposes a public
no-arg constructor while its required String getters (getAppId, getName,
getOrgId, getOwnerName) are annotated `@javax.annotation.Nonnull` which is unsound
because those fields can remain null; either remove or restrict the public
no-arg constructor (make it private/protected or provide a builder/constructor
that requires appId/name/orgId/ownerName) so instances cannot be created with
null required fields, or alternatively change those getters to `@Nullable` and add
runtime validation (e.g., in a validate() method or in the builder/deserializer)
to enforce presence; update the class accordingly and keep annotations
consistent with the new construction/validation approach.

In `@spring-boot2/src/main/resources/openapi.yaml`:
- Around line 6456-6460: Update the OpenConsumerInfoDTO.token description to
remove the stale phrase "按应用查询详情" and reflect the current behavior after the
endpoint split where /openapi/v1/consumer-tokens/by-appId now returns
OpenConsumerTokenDTO; specifically edit the token field description in the
OpenConsumerInfoDTO schema (symbol: OpenConsumerInfoDTO.token) to either a
neutral description of the token value or to state the correct endpoint(s) that
return it, and ensure consistency with OpenConsumerTokenDTO's documentation.

---

Duplicate comments:
In `@python/docs/apis/tags/PortalManagementApi.md`:
- Line 3084: The Markdown table row for OpenConsumerInfoDTO in
PortalManagementApi.md is malformed (it has only four cells for a five-column
header) and uses the unresolved token {{complexTypePrefix}}; update the row for
OpenConsumerInfoDTO to include the missing fifth cell (e.g., an appropriate
description or placeholder) and replace the
`{{complexTypePrefix}}OpenConsumerInfoDTO.md` links with the correct
relative/absolute link target (or plain filename) so the three link cells point
to a valid OpenConsumerInfoDTO doc; locate the row containing
OpenConsumerInfoDTO to make these edits.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 278231f6-8a1c-465c-9777-367843733fc9

📥 Commits

Reviewing files that changed from the base of the PR and between 1d1d582 and f9feda0.

📒 Files selected for processing (44)
  • apollo-openapi.yaml
  • java-client/.openapi-generator/FILES
  • java-client/README.md
  • java-client/api/openapi.yaml
  • java-client/docs/OpenConsumerCreateRequestDTO.md
  • java-client/docs/OpenConsumerSummaryDTO.md
  • java-client/docs/PortalManagementApi.md
  • java-client/src/main/java/org/openapitools/client/JSON.java
  • java-client/src/main/java/org/openapitools/client/api/PortalManagementApi.java
  • java-client/src/main/java/org/openapitools/client/model/OpenConsumerCreateRequestDTO.java
  • java-client/src/main/java/org/openapitools/client/model/OpenConsumerSummaryDTO.java
  • java-client/src/test/java/org/openapitools/client/api/PortalManagementApiTest.java
  • python/.openapi-generator/FILES
  • python/README.md
  • python/apollo_openapi/model/open_consumer_create_request_dto.py
  • python/apollo_openapi/model/open_consumer_create_request_dto.pyi
  • python/apollo_openapi/model/open_consumer_summary_dto.py
  • python/apollo_openapi/model/open_consumer_summary_dto.pyi
  • python/apollo_openapi/models/__init__.py
  • python/apollo_openapi/paths/openapi_v1_consumers/get.py
  • python/apollo_openapi/paths/openapi_v1_consumers/get.pyi
  • python/docs/apis/tags/PortalManagementApi.md
  • python/docs/models/OpenConsumerCreateRequestDTO.md
  • rust/.openapi-generator/FILES
  • rust/Cargo.toml
  • rust/README.md
  • rust/docs/OpenConsumerCreateRequestDto.md
  • rust/docs/OpenConsumerSummaryDto.md
  • rust/src/models/mod.rs
  • rust/src/models/open_consumer_create_request_dto.rs
  • rust/src/models/open_consumer_summary_dto.rs
  • spring-boot2/.openapi-generator/FILES
  • spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApi.java
  • spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiController.java
  • spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiDelegate.java
  • spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerCreateRequestDTO.java
  • spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerSummaryDTO.java
  • spring-boot2/src/main/resources/openapi.yaml
  • tests/test_user_management_contract.py
  • typescript/.openapi-generator/FILES
  • typescript/src/apis/PortalManagementApi.ts
  • typescript/src/models/OpenConsumerCreateRequestDTO.ts
  • typescript/src/models/OpenConsumerSummaryDTO.ts
  • typescript/src/models/index.ts
💤 Files with no reviewable changes (21)
  • rust/docs/OpenConsumerSummaryDto.md
  • typescript/.openapi-generator/FILES
  • python/apollo_openapi/models/init.py
  • java-client/docs/OpenConsumerSummaryDTO.md
  • rust/src/models/open_consumer_summary_dto.rs
  • spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenConsumerSummaryDTO.java
  • rust/src/models/mod.rs
  • java-client/src/main/java/org/openapitools/client/JSON.java
  • python/.openapi-generator/FILES
  • typescript/src/models/OpenConsumerSummaryDTO.ts
  • typescript/src/models/index.ts
  • python/apollo_openapi/model/open_consumer_summary_dto.py
  • java-client/README.md
  • rust/.openapi-generator/FILES
  • spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiController.java
  • java-client/src/main/java/org/openapitools/client/model/OpenConsumerSummaryDTO.java
  • spring-boot2/.openapi-generator/FILES
  • java-client/.openapi-generator/FILES
  • python/apollo_openapi/model/open_consumer_summary_dto.pyi
  • rust/README.md
  • python/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/test_user_management_contract.py

Comment thread java-client/api/openapi.yaml
Comment thread python/docs/models/OpenConsumerCreateRequestDTO.md Outdated
Comment thread rust/docs/OpenConsumerCreateRequestDto.md Outdated
Comment thread spring-boot2/src/main/resources/openapi.yaml

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90d81724b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apollo-openapi.yaml
type: array
items:
$ref: '#/components/schemas/OpenConsumerSummaryDTO'
$ref: '#/components/schemas/OpenConsumerInfoDTO'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the summary DTO for consumer lists

Because this is still published as patch release 0.3.7, switching /openapi/v1/consumers from OpenConsumerSummaryDTO to OpenConsumerInfoDTO also deletes the public OpenConsumerSummaryDTO model and changes the generated getConsumerList return types across SDKs; clients upgrading from 0.3.6 that import that model or implement the generated server delegate will break even though the endpoint behavior did not need to change to restore the token-specific response. Keep the summary schema for the list response, or make this a larger breaking-version change.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This contract simplification is intentional for this release workflow. Apollo OpenAPI currently has no external consumers, and the paired Apollo portal/UI change is allowed to make breaking contract changes while both repositories move together. The list endpoint still does not expose token values; it reuses OpenConsumerInfoDTO for non-secret consumer metadata to reduce the redundant create/info/summary DTO surface, while token retrieval remains isolated behind OpenConsumerTokenDTO.

@nobodyiam
nobodyiam merged commit 05cc134 into main Jun 6, 2026
5 checks passed
@nobodyiam
nobodyiam deleted the codex/fix-consumer-token-contract branch June 6, 2026 10:38
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.

2 participants