Skip to content

auto-gen: SDK changes (e72f10f3) - #429

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

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

Conversation

@barajas-d

Copy link
Copy Markdown
Contributor

Automated code generation.

generation_id: e72f10f3-6309-494a-b1d7-c5e1ea9ab987

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: MPElementsResourcesPage
  • Planner precondition was not present in the original repository snapshot and was removed before execution: StoreClient
  • [REQ-03] Add the missing convenience overloads to StoreClient (create(Long, StoreCreateRequest), get(Long), get(Long, MPRequestOptions), search(Long, MPSearchRequest), plus the update/delete overloads used by the truncated remainder of StoreClientTest), or change the tests to call the existing signatures. Do not change existing public methods. (src/main/java/com/mercadopago/client/store/StoreClient.java, src/test/java/com/mercadopago/client/store/StoreClientTest.java): StoreClient.java defines only create(Long, StoreCreateRequest, MPRequestOptions), get(String, MPRequestOptions), and search(Long, MPSearchRequest, MPRequestOptions) returning MPResponse; StoreClientTest.java calls client.create(userId, createRequest), client.get(storeId), client.get(storeId, buildRequestOptions()), and client.search(userId, searchRequest).
  • [REQ-01] Add the missing convenience overload search(Long userId, MPSearchRequest searchRequest) returning MPResultsResourcesPage (delegating to the MPResponse-based search and deserializing the page), or change SearchStores.java to consume MPResponse. (src/main/java/com/mercadopago/client/store/StoreClient.java, src/main/java/com/mercadopago/example/store/SearchStores.java): StoreClient.search returns MPResponse; SearchStores.java assigns the result to MPResultsResourcesPage.
  • [REQ-02] Define the nested StoreLocationRequest and StoreBusinessHoursRequest types inside StoreUpdateRequest (or import the nested types from StoreCreateRequest and reference them as StoreCreateRequest.StoreLocationRequest / StoreCreateRequest.StoreBusinessHoursRequest). (src/main/java/com/mercadopago/client/store/StoreUpdateRequest.java): StoreUpdateRequest.java references StoreLocationRequest and StoreBusinessHoursRequest with no import or nested declaration; those types only exist as nested classes of StoreCreateRequest.
  • [REQ-04] Replace the builder calls with fields that exist on StoreCreateRequest.StoreLocationRequest (streetName/streetNumber/additionalInfo) or add the missing fields to StoreLocationRequest, keeping the DTO consistent with the API schema and the request mock. (src/main/java/com/mercadopago/example/store/CreateStore.java, src/main/java/com/mercadopago/client/store/StoreCreateRequest.java): CreateStore.java calls .addressName(...), .addressLine(...), .reference(...) on StoreLocationRequest, which only declares streetName, streetNumber, zipCode, additionalInfo, city, state, latitude, longitude.
  • [REQ-03] Align StoreCreateRequest/StoreUpdateRequest field types with the serialized request mocks (e.g., model business_hours weekday values and location fields to match store_base.json/store_update.json) so the createSuccess payload assertion can pass. (src/main/java/com/mercadopago/client/store/StoreCreateRequest.java, src/test/java/com/mercadopago/resources/mocks/request/store/store_base.json): store_base.json request mock serializes business_hours.monday as an array of {open, close} objects and location with address_line/state_name, while StoreCreateRequest serializes businessHours as String per weekday and location with street_name/street_number; createSuccess asserts requestPayload equals the mock.
  • [REQ-03] Add @SerializedName("date_created") to dateCreated (and verify business_hours/location shapes against the response mocks, including array-valued weekdays and object-valued city in store_search.json), then confirm assertStoreFields in StoreClientTest matches. (src/main/java/com/mercadopago/resources/store/Store.java, src/test/java/com/mercadopago/resources/mocks/response/store/store_base.json, src/test/java/com/mercadopago/resources/mocks/response/store/store_search.json): Response mocks use "date_created" and business_hours/location shapes that do not map to Store's fields without annotations; Store.dateCreated has no @SerializedName and Store.Location models city/state as String while store_search.json returns city as an object.
  • The truncated StoreClientTest excerpt prevents confirming that direct tests for update and delete exist and assert PUT /users/{user_id}/stores/{id} and DELETE /users/{user_id}/stores/{id}; the executor must ensure both tests are present in the final file.
  • No runtime/credentials available in this review, so test compilation and execution could not be observed; verification is static only.

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