Search code examples
wso2wso2-governance-registry

WSO2 Governance Registry Json Schema


I'm facing some problems regarding the publication GREG using Swagger. I wonder if you have any way to make GREG recognize the JSON Schema, because I saw that it only recognizes XML Schema which ends up forcing me to use WADL.


Solution

  • I presume you are using G-Reg 4 series which does not have Swagger support. However, in G-Reg 5 series WSO2 have enabled this and you can find the latest version which is G-Reg 5.3.0 from here. Other than that, new G-Reg offers you some more very useful features to enhance SOA governance capabilities.

    Adding a SOAP service using a Swagger

    Adding the Swagger file

    To enable json schema you have to create a handler. Please refer below sample media type handlers available in greg(carbon-registry)

    WSDLMediaTypeHandler.java

    SwaggerMediaTypeHandler.java

    WADLMediaTypeHandler.java

    Please find this useful article which will teach you how to create a simple handler.