On Fri, Oct 26, 2018 at 2:37 PM Joseph Fonseka <[email protected]> wrote:
> > > On Fri, Oct 26, 2018 at 11:58 AM Nuwan Dias <[email protected]> wrote: > >> >> >> On Fri, 26 Oct 2018 at 11:16 am, Arshardh Ifthikar <[email protected]> >> wrote: >> >>> Hi all, >>> >>> The existing Microgateway loads the api via contacting the API Manager >>> instance that should be up and running. We are developing a feature where >>> we have given the option to setup the Microgateway without an API Manager >>> instance running. There are two aspects that the Microgateway uses the API >>> Manager during setup >>> >>> 1. Loading the Api Definition >>> 2. Fetching the Throttling Policies >>> >>> In order to decouple the the Microgateway from API Manager, these >>> aspects needs to be addressed. >>> >>> *1. Loading the Api Definition* >>> This implementation requires the user to enter at least the path of the >>> open api specification file and the endpoint of that API. If the user needs >>> additional functionality, they can provide the paths to the endpoint >>> definition and the CORS configuration json files. >>> >>> - The Open API Specification file should be given with the *-o *or >>> * --open-api *option. >>> - The endpoint needs to be given with the *-e* or *--endpoint* >>> option. >>> - If the user needs to give additional information on the endpoint >>> (ex: endpoint type), the user can give the path to the endpoint config >>> with >>> the *-ec* or *--endpointConfig *option. >>> - The user can provide the path to the CORS configuration with the >>> *-cc* or *--corsConfig *option. >>> >>> We do need to introduce a way to provide additional information that we >> cannot already do with OAS. But that shouldn’t mean that we should do that >> with a lot of files because that reduces the user experience. So we >> probably need to find a way to contract this information to one file. >> > > OAS extentions [1] can be used to capture aditional information. > The problem is that these are not standard. Since the OAS files are user-provided data, we cannot rely on those to bear information that our system requires. So I think its best to stick to the OAS spec only, so that we can work with any OAS file provided to us from any system without requiring modifications to it. > > Regards > Jo > > [1] > https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#specification-extensions > > >> >> The following is the basic command to setup a new API in the >>> Microgateway with this feature implemented. >>> >>>> *micro-gw setup test-project -o /path/to/def/apidef.json -e >>>> http://localhost:9090/hello/sayHello >>>> <http://localhost:9090/hello/sayHello>* >>> >>> >>> *2. Fetching the Throttling Policies* >>> We store the most commonly used policies within the >>> Microgateway distribution and copy these policies to the project when the >>> setup command is executed. If a user needs to add a custom policy, the user >>> can add it to the policy directory in the Microgateway. >>> >>> Your comments and suggestions on this feature will be highly appreciated. >>> >>> Thanks, >>> Arshardh >>> -- >>> *Arshardh Ifthikar* >>> Software Engineer | WSO2 Inc. >>> >>> Email: [email protected] >>> Mobile: +94719806525 >>> Web: http://wso2.com >>> >>> <http://wso2.com/signature> >>> _______________________________________________ >>> Architecture mailing list >>> [email protected] >>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>> >> -- >> *Nuwan Dias* | Director | WSO2 Inc. >> (m) +94 777 775 729 | (e) [email protected] >> [image: Signature.jpg] >> _______________________________________________ >> Architecture mailing list >> [email protected] >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> > > > -- > > -- > *Joseph Fonseka* > WSO2 Inc.; http://wso2.com > lean.enterprise.middleware > > mobile: +94 772 512 430 > skype: jpfonseka > > * <http://lk.linkedin.com/in/rumeshbandara>* > > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > -- *Nuwan Dias* | Director | WSO2 Inc. (m) +94 777 775 729 | (e) [email protected] [image: Signature.jpg]
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
