×

Self-documentation for representational state transfer (REST) application programming interface (API)

  • US 9,959,363 B2
  • Filed: 06/26/2014
  • Issued: 05/01/2018
  • Est. Priority Date: 06/26/2014
  • Status: Active Grant
First Claim
Patent Images

1. A method for documenting a representational state transfer (REST) resource, the method comprising:

  • receiving an indication that a REST resource of an application is being accessed;

    externally monitoring, by one or more processors, usage of the REST resource of the application utilizing a JAX-RS/servlet filter, including input JavaScript Object Notation (JSON) data to the REST resource of the application and output JSON data from the REST resource of the application, wherein the REST resource is provided by Java API for RESTful Web Services (JAX-RS);

    determining, by one or more processors, whether a schema file exists for the REST resource of the application;

    responsive to determining that the schema file does not exist, capturing, by one or more processors, a set of data from the monitored input JSON data to the REST resource of the application and the monitored output JSON data from the REST resource of the application;

    converting, by one or more processors, the captured set of data from the monitored input JSON data and output JSON data Extensible Markup Language (XML) Schema (XSD);

    storing, by one or more processors, the converted set of data from the monitored input JSON data and output JSON data;

    receiving a request for documentation for the REST resource;

    retrieving, by one or more processors, the converted set of data from the monitored input JSON data and output JSON data of the REST resource;

    generating, by one or more processors, documentation for the REST resource, wherein the documentation is Web Application Description Language (WADL) format;

    inserting, by one or more processors, the converted set of data from the monitored input JSON data and output JSON data within the documentation for the REST resource; and

    returning, by one or more processors, the documentation with the converted set of data from the monitored input JSON data and output JSON data.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×