Skip to content

auto-gen: SDK changes (1dd9e39b) - #431

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

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

Conversation

@barajas-d

Copy link
Copy Markdown
Contributor

Automated code generation.

generation_id: 1dd9e39b-498c-495d-99fa-898c4b0e57bf

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:

  • 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-03] Rewrite buildStoreRequest() in StoreClientTest to construct the existing StoreRequest and its nested StoreRequest.StoreLocationRequest / StoreRequest.StoreBusinessHoursRequest builders (fields: name, location, businessHours; location fields: streetName, streetNumber, zipCode, floor, apartment, cityName, stateName, latitude, longitude as String), or alternatively add a StoreCreateRequest type if that is the intended request model — but then StoreClient.create/update must accept it. Smallest fix: align the test with StoreRequest. (src/test/java/com/mercadopago/client/store/StoreClientTest.java): StoreClientTest.buildStoreRequest() references com.mercadopago.client.store.StoreCreateRequest and StoreLocationRequest with fields addressLine, reference, latitude(-23.61f), longitude(-46.69f); the only request type in the diff is StoreRequest with nested StoreRequest.StoreLocationRequest whose fields are streetName/streetNumber/zipCode/floor/apartment/cityName/stateName/latitude(String
  • [REQ-03] Change the call to new StoreClient().delete(123L, "456") (or overload delete to accept Long storeId consistently with get(String)). (src/test/java/com/mercadopago/client/store/StoreClientTest.java): StoreClient.delete is declared as delete(Long userId, String storeId, MPRequestOptions) but the test invokes delete(123L, 456L) with a long literal.
  • [REQ-03] Rewrite buildStoreRequest() in StoreClientTest to construct the existing StoreRequest and its nested StoreRequest.StoreLocationRequest / StoreRequest.StoreBusinessHoursRequest builders (fields: name, location, businessHours; location fields: streetName, streetNumber, zipCode, floor, apartment, cityName, stateName, latitude, longitude as String), or alternatively add a StoreCreateRequest type if that is the intended request model — but then StoreClient.create/update must accept it. Sm ... with StoreRequest. (src/test/java/com/mercadopago/client/store/StoreClientTest.java): StoreClientTest.buildStoreRequest() references com.mercadopago.client.store.StoreCreateRequest and StoreLocationRequest with fields addressLine, reference, latitude(-23.61f), longitude(-46.69f); the only request type in the diff is StoreRequest with nested StoreRequest.StoreLocationRequest whose fields are streetName/streetNumber/zipCode/floor/apartment/cityName/stateName/latitude(String)/longitude(String).
  • REQ-03: StoreClientTest must compile against the implemented StoreClient/StoreRequest API; currently references non-existent StoreCreateRequest and mismatched delete signature.
  • No runtime/compile execution evidence is available in this review; compile-blocking findings above are derived from source inspection of the diff and supplemental repository source.
  • Integration tests against the live Stores API would require credentials unavailable to this execution and cannot be produced by repository edits.
  • [REQ-01] Remove the unused import com.google.gson.reflect.TypeToken from StoreClient.java. (src/main/java/com/mercadopago/client/store/StoreClient.java): Imported but never referenced in the class body.
  • [REQ-04] Verify the mock resource path constant matches the repository's MockHelper convention (e.g. "/mocks/response/store/store_base.json") and that the created request mock file is either referenced by a test assertion or its path corrected; the response mock path must resolve to src/test/java/com/mercadopago/resources/mocks/response/store/store_base.json at runtime. (src/test/java/com/mercadopago/client/store/StoreClientTest.java, src/test/java/com/mercadopago/resources/mocks/request/store/store_base.json): Test loads "/store/store_base.json" while files were created under resources/mocks/{request,response}/store/; existing SDK tests conventionally prefix mock paths with /mocks/... The request mock store_base.json is never referenced by any test.

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