I am working on the improvement of 'Pre-populating API Manager with one
sample API in APIM'. The decided approach is create a simple API using
inline implementation with script mediator in the server startup. For
this,apim startup.publisher package will be re-used. There will be some
changes in the startup.publisher package as below as currently that package
doesn't support create APIs with inline implementation approach.
Note-With below changes,the current functionality in startup publisher
which is used by GReg/AS will not be break.
- adding extra configuration property as 'isInline' in APIManager.xml to
get the API implementation method.If this value is true,then use inline
implementation approach,instead wrapping the API with a back-end endpoint.
<LocalAPIs>
<LocalAPI>
<Context>/resource</Context>
<Provider>admin</Provider>
<Version>1.0.0</Version>
<IconPath>none</IconPath>
<DocumentURL>none</DocumentURL>
<AuthType>Any</AuthType>
*<isInline>true</isInline>*
</LocalAPI>
</LocalAPIs>
-changing createAPIModel and createAPIAtServerStartup method signatures as
below
private API createAPIModel(String apiName, String apiProvider,
String apiVersion, String apiEndpoint,
String apiContext,
String iconPath, String documentURL, String
authType,
*boolean isInline*)
private void createAPIAtServerStartup(
String apiName, String apiProvider,
String apiVersion, String
apiEndpoint, String apiContext,
String iconPath, String
documentURL, String authType,
*boolean isInline*)
Please reply if you have any opinion about this.
Thanks,
Nisala
--
*Best Regards,Nisala Niroshana Nanayakkara,*
*Bsc. Eng Undergraduate | Department of Computer Science & Engineering |
University of Moratuwa | Sri Lanka*
*Intern Software Engineer | WSO2 Lanka(pvt) Ltd *
*Director | Leo Club of University of Moratuwa.*
*Mobile | +94717600022*
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture