AI Agent Hub
Back to skills
Heepay Open Platform Code Generation icon

Heepay Open Platform Code Generation

Development Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Please install @user_7e850f2d/hop-sdk-skills by following https://skillhub.cn/install/skillhub.md.

About this skill

Problem

When integrating with the Heepay Open Platform, API payloads often contain many fields and nested objects. Manually translating interface documentation into Java request classes, response classes, tests, and local debug pages is error-prone, especially for @JsonProperty annotations, type mapping, and appending generated code into the same Maven project over time.

How It Works

This skill targets explicit API code generation tasks. It can be triggered when a user mentions an API method code such as pay.heepay.bank.apply, or describes business objects like payments, orders, invoices, or complaints. The workflow is anchored to the reference/hyw-demo/ Maven project so package layout, naming, and annotation style stay consistent.

Key steps include:

  • Ask for the output path: generation confirms where to place the project, with a default location of generated/hyw-demo/.
  • Fetch API metadata: a Python script returns data.info, data.request_fields, and data.response_fields, which drive the request, response, and nested object design.
  • Generate project skeleton and Java code: on first generation, it adds files such as pom.xml, Application.java, lib/, and logback.xml, while placing VO classes under com.hyw.demo.vo.
  • Generate tests and debug entries: it creates a test class, an HTML debug page, and a TestController for each API, then maintains the index.html endpoint list.
  • Validate output: it checks field coverage, brace matching, type consistency, imports, and required @JsonProperty("original_json_name") annotations.

Boundaries

The skill is best suited to generating a Java/Maven client project when the Heepay method code is known. It does not design final payment, invoice, or complaint business rules by itself. Confirm that the API method code is correct, the output directory is writable, and repeated generation should append into the same hyw-demo structure. If field semantics, enum values, or merchant permissions are unclear, review the Open Platform documentation manually.

Use Cases

  • Payment backend engineers generate request classes, response classes, and test entries for online banking, quick pay, or balance APIs from method codes.
  • Java engineers scaffold a local Maven integration project and map Heepay API fields into VO classes, controllers, and test pages.
  • Testers invoke generated APIs from the browser using the maintained `index.html` and interface test pages.
  • Integration engineers produce code skeletons for invoice, complaint, or transfer APIs before adding real business logic.

Best For

  • Payment system backend engineers who need to turn Heepay Open Platform APIs into Java Maven client code and tests.
  • Java integration engineers who need local VO classes, `TestController` classes, HTML pages, and consistent package structure.
  • API integration testers who need method-code-driven request samples, response field mappings, and browser test entries.
  • Developers or technical support staff familiar with Heepay business flows who need to locate method codes and generate code skeletons.