Search code examples
wso2wso2-governance-registry

Is it possible to upload file to WSO2 Governance Registry resource?


We define new Governance Registry artifact type, and we want define the field that can upload the attachment, how we can do that? Any example? Thank you


Solution

  • There are 2 types of artifacts in GReg

    • Content type (Ex:WSDL,WADL,Swagger,Policy etc...)
    • Metadata type (Ex:Restservice, Soapservice, etc...)

    I assume that you have created a metadata type rxt which we can not upload the attachment as a field. However you can achieve this by registry associations. Create one metadata type rxt and create a content type rxt to upload the attachment. Then create association between both of them manually. using this link you will have direct link between these two artifact types.

    Link to the attachment:

    Link to the attachment

    Dependancy graph: this is additional feature that you can visualise your associations.

    Dependancy graph

    You can automate this whole process by using registry mediaType handlers. You can find already created handlers from here

    Hope this helps.