Re: [Architecture] [APIM] Json Schema Validation

2018-04-28 Thread Dimuthu Leelarathne
Yes. It sounds ok. I think eventually when we move to Ballrina it should be inbuilt. On Fri, Apr 27, 2018, 09:06 Hasunie Adikari wrote: > If we can add the swagger file to the local entry instead of adding the > schema, It would avoid by creating multiple entries per API and

Re: [Architecture] [APIM] Json Schema Validation

2018-04-27 Thread Hasunie Adikari
If we can add the swagger file to the local entry instead of adding the schema, It would avoid by creating multiple entries per API and it is getting created one entry per API. Then we can create the local entry key like api+ resource version so that retrieve the local entry value without

Re: [Architecture] [APIM] Json Schema Validation

2018-03-15 Thread Nuwan Dias
AFAIK we can have rxt fields as optional. Or worst case add fields to the rxt on demand, during update. Let’s try and avoid properties since it causes data of the same api to be in different places. On Fri, 16 Mar 2018 at 10:32 am, Megala Uthayakumar wrote: > Hi

Re: [Architecture] [APIM] Json Schema Validation

2018-03-15 Thread Megala Uthayakumar
Hi Nuwan/Sanjeewa/APIM Team, Since we need a way to keep track of whether json schema validation is enabled or not for a particular API, shall we go ahead with a regsitry property for this, as we did for publisher access control feature before? If we are going with an attribute, we may need to

Re: [Architecture] [APIM] Json Schema Validation

2018-03-15 Thread Chamin Dias
Hi, On Thu, Mar 15, 2018 at 2:44 PM, Sanjeewa Malalgoda wrote: > Hi Sivaramya, > Its always good to start with complete swagger sample hosted by swagger. > If you look at APIs deployed here then different paths accept different > request payloads. > How are we adding resource

Re: [Architecture] [APIM] Json Schema Validation

2018-03-15 Thread Sanjeewa Malalgoda
Hi Sivaramya, Its always good to start with complete swagger sample hosted by swagger. If you look at APIs deployed here then different paths accept different request payloads. How are we adding resource accordingly? Is that local entry UUID passed to class mediator knows resource specific schema?

Re: [Architecture] [APIM] Json Schema Validation

2018-03-14 Thread Megala Uthayakumar
I just had a looked at the current code, and seems we are building the message on-demand[1]. In that case, the relevant message will not be build until it goes to the content-aware mediator level. Hence I think we can go ahead with the class mediator based approach. [1]

Re: [Architecture] [APIM] Json Schema Validation

2018-03-14 Thread Shazni Nazeer
I'm not opposed to using the existing validate mediator. But won't it avoid building the message one extra time by using a class mediator? On Wed, Mar 14, 2018 at 11:05 PM, Megala Uthayakumar wrote: > Hi Sivaramya, > > We decided to go for a class mediator without using

Re: [Architecture] [APIM] Json Schema Validation

2018-03-14 Thread Megala Uthayakumar
Hi Sivaramya, We decided to go for a class mediator without using existing validate mediator to avoid building the message. However, on a second thought, if we add the class mediator inside the insequence of the resource as below, * * * * * * * * AFAIK in synapse level,

[Architecture] [APIM] Json Schema Validation

2018-03-14 Thread Sivaramya Sivanathan
Hi all, Currently, I'm working on the Json Schema Validation for API manager. When we execute a API request, we need to do the Json schema validation so that we can reduce the backend failures and also we can protect the gateways. For this feature the proposed method is as follows, - Add