Skip to content

auto-gen: SDK changes (a8ff03e9) - #434

Draft
Diego Barajas (barajas-d) wants to merge 1 commit into
masterfrom
auto-gen/a8ff03e9-generic
Draft

Diego Barajas (barajas-d) wants to merge 1 commit into
masterfrom
auto-gen/a8ff03e9-generic

Conversation

@barajas-d

Copy link
Copy Markdown
Contributor

Automated code generation.

generation_id: a8ff03e9-e094-4f64-8db4-d799f2eac0cb

Review required before merge.

@barajas-d

Copy link
Copy Markdown
Contributor Author

Automated reviewer warnings

This pull request was created with the following advisory findings. Review them before merging:

  • Planner precondition was not present in the original repository snapshot and was removed before execution: MPResultsResourcesPage
  • required criterion output is missing [REQ-01]: GET /stores/{id}
  • required criterion output is missing [REQ-01]: PUT /users/{user_id}/stores/{id}
  • required criterion output is missing [REQ-01]: DELETE /users/{user_id}/stores/{id}
  • [REQ-02] Add import java.util.Map; to src/main/java/com/mercadopago/resources/store/Store.java (or change the two fields to fully-qualified types). Do not alter any other existing content. (src/main/java/com/mercadopago/resources/store/Store.java): Store.java uses private Map<String, Object> location; and private Map<String, Object> businessHours; but the import block only contains com.mercadopago.net.MPResource and lombok annotations.
  • [REQ-02] Add import com.google.gson.annotations.SerializedName; to src/main/java/com/mercadopago/client/store/StoreCreateRequest.java so the existing @SerializedName annotations resolve. (src/main/java/com/mercadopago/client/store/StoreCreateRequest.java): @SerializedName("business_hours") is applied to businessHours but no matching import exists in StoreCreateRequest.java (StoreUpdateRequest.java imports it correctly).
  • [REQ-03] Rewrite src/test/java/com/mercadopago/client/store/StoreClientTest.java as a proper test class that instantiates StoreClient with a mocked MPHttpClient (BaseClientTest/MockHelper convention) and contains one direct test per operation: POST /users/{user_id}/stores, GET /stores/{id}, GET /users/{user_id}/stores/search, PUT /users/{user_id}/stores/{id}, DELETE /users/{user_id}/stores/{id}, asserting method, path, payload and deserialization using the provided store_* mocks. Do not duplicate client method bodies inside the test class. (src/test/java/com/mercadopago/client/store/StoreClientTest.java): The excerpt shows public Store create(Long userId, StoreCreateRequest request) with LOGGER/send/Serializer and public MPResultsResourcesPage<Store> search(Long userId, PageableRequest pageableRequest, ...) inside the test class; those symbols are not defined or imported there (LOGGER, send, encodePathParam, Serializer, PageableRequest, HttpStatus, HttpUriRequest, JsonElement, APP
  • [REQ-03] Rewrite src/test/java/com/mercadopago/client/store/StoreClientTest.java as a proper test class that instantiates StoreClient with a mocked MPHttpClient (BaseClientTest/MockHelper convention) and contains one direct test per operation: POST /users/{user_id}/stores, GET /stores/{id}, GET /users/{user_id}/stores/search, PUT /users/{user_id}/stores/{id}, DELETE /users/{user_id}/stores/{id}, asserting method, path, payload and deserialization using the provided store_* mocks. Do not dupl ... LOGGER/send/Serializer and public MPResultsResourcesPage<Store> search(Long userId, PageableRequest pageableRequest, ...) inside the test class; those symbols are not defined or imported there (LOGGER, send, encodePathParam, Serializer, PageableRequest, HttpStatus, HttpUriRequest, JsonElement, APPLICATION_JSON all lack definitions/imports). The excerpt is truncated before any test method or delete coverage, so the required direct tests for the five operations cannot be confirmed to exist.
  • REQ-03 cannot be verified as satisfied: the visible StoreClientTest.java excerpt is truncated and contains no executable test for any of the five operations; in particular, no direct test for DELETE /users/{user_id}/stores/{id} is evidenced.
  • Minor fixture inconsistency: store_base.json/store_search.json use date_created (and store_search.json uses date_creation) while other fixtures differ; if a direct test asserts dateCreated on the Store resource, ensure the fixture field name matches the resource mapping (date_created) — see src/test/java/com/mercadopago/resources/mocks/response/store/store_search.json and store_base.json.
  • No runtime, credentials or network access is available in this execution, so the unit tests and an end-to-end Stores API validation could not be run; this is evidence unavailability only, not a repository defect.
  • [REQ-03] StoreUpdateRequest cannot serialize external_id, which its own test fixture store_update.json contains; either add an external_id field to StoreUpdateRequest (matching the spec's update schema) or remove external_id from the fixture so the request type and the direct test fixture agree. (src/main/java/com/mercadopago/client/store/StoreUpdateRequest.java, src/test/java/com/mercadopago/resources/mocks/request/store/store_update.json): store_update.json includes "external_id": "external-id-123" while StoreUpdateRequest only declares name, businessHours and location.
  • [REQ-01] Remove the dead package-private marker method verifySearchConvention() (and its process-note comment) from StoreClient.java; it is unused scaffolding and should not be part of the published client. (src/main/java/com/mercadopago/client/store/StoreClient.java): void verifySearchConvention() { // no-op } with comment 'Marker method retained for wave-1 verification of the search deserialization convention.'

This branch has not been deployed

No deployments
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.

1 participant