The invention discloses an interface
code generation and maintenance method and device, equipment and a medium, and relates to the field of
software codes, and the interface
code generation and maintenance method comprises the steps that after environment
verification and resource loading are completed, legality
verification is conducted on all attribute configuration
JSON files, and after
verification succeeds, text content of the attribute configuration
JSON files is read; extracting a target field of a root node of the attribute configuration
JSON file according to the text information, obtaining attribute information based on the target field, and generating a target interface code based on the attribute information and the template file; creating a
callback management container for the target attribute needing to be notified, and generating a
public interface corresponding to the target attribute, so as to add or remove a
callback function in the
callback management container of the target attribute through the
public interface; and when the target attribute is changed, traversing and executing the callback function in the callback management container at the
public interface according to the target sequence so as to complete the attribute change notification. Therefore, the code can be automatically generated, and the maintenance cost is reduced.