GENERATING JAVASCRIPT OBJECT NOTATION (JSON) SCHEMA FROM JSON PAYLOADS

    公开(公告)号:US20190188288A1

    公开(公告)日:2019-06-20

    申请号:US15847811

    申请日:2017-12-19

    CPC classification number: G06F16/211 G06F8/30 G06F8/315 G06F16/289

    Abstract: Implementations of the invention generate a JavaScript Object Notation (JSON) schema for an application programming interface (API) endpoint that is not documented in a machine understandable schema. In one implementation, a plurality of JSON payloads that were successfully requested using a same endpoint are automatically obtained, and a composite payload is automatically created based on the plurality of JSON payloads that were obtained. Then a JSON schema that documents the API endpoint is automatically generated based on the composite payload. The generating comprises for each field of the composite payload, determining whether the field is optional or mandatory based on a number of the data items that are in the composite payload for the field, and determining a data type of the field based on the data items in the composite payload for the field.

Patent Agency Ranking