JingsongLi commented on code in PR #10599:
URL: https://github.com/apache/paimon/pull/10599#discussion_r4294870824
##########
docs/static/rest-catalog-open-api.yaml:
##########
@@ -3686,6 +3767,58 @@ components:
schemaId:
type: integer
format: int64
+ ReplaceTableRequest:
+ type: object
+ properties:
+ schema:
+ $ref: '#/components/schemas/Schema'
+ TableSchema:
+ type: object
+ properties:
+ version:
+ type: integer
+ format: int32
+ id:
+ type: integer
+ format: int64
+ fields:
+ type: array
+ items:
+ $ref: '#/components/schemas/DataField'
+ highestFieldId:
+ type: integer
+ format: int32
+ partitionKeys:
+ type: array
+ items:
+ type: string
+ primaryKeys:
+ type: array
+ items:
+ type: string
+ options:
+ type: object
+ additionalProperties:
+ type: string
+ comment:
+ type: string
+ timeMillis:
+ type: integer
+ format: int64
+ ListSchemasResponse:
+ type: object
+ properties:
+ schemas:
+ type: array
+ items:
+ $ref: '#/components/schemas/TableSchema'
+ nextPageToken:
+ type: string
Review Comment:
[P2] Allow the terminal page token to be null
The new response schema declares `nextPageToken` as a string only, but
normal last pages include a JSON null. Using the actual serializer,
`RESTApi.toJson(new ListSchemasResponse(Collections.emptyList()))` produces
`{"schemas":[],"nextPageToken":null}`;
`RESTCatalogServerMetadataHandler.listSchemas` also sets the token to null when
paging ends. Validating that successful response against this new OpenAPI
schema fails with `None is not of type string`, so consumers using response
validation reject ordinary completed listings. Please declare `type: [string,
"null"]` (or consistently omit null tokens on the wire) and cover a
terminal-page response in the contract checks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]