Re: Review Request 59391: Integrate RequestService resource and it's subresources with swagger

2017-05-22 Thread Balázs Bence Sári


> On May 20, 2017, 7:10 a.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
> > Line 26 (original), 27 (patched)
> > 
> >
> > The "dummy" interface `RequestPostRequest` also defines a 
> > `RequestResourceFilter`.  Is this one really an `ApiModel`?
> 
> Balázs Bence Sári wrote:
> Th top level RequestResourceFilter class doesn't encapsulate all 
> information contained by the schema, hence the new one.
> 
> Attila Doroszlai wrote:
> Yes, I understand that.  The question is whether we need the old one to 
> be an `ApiModel`.

I think no because the new one is used for schema generation.


- Balázs Bence


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59391/#review175589
---


On May 22, 2017, 11:41 a.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59391/
> ---
> 
> (Updated May 22, 2017, 11:41 a.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jaimin Jetly, Oliver Szabo, 
> Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-21063
> https://issues.apache.org/jira/browse/AMBARI-21063
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Annotated RequrstServices and request/response models with Swagger 
> annotations. Sub-resources are skipped as Swagger doesn't support them out of 
> the box in their current form.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
>  936b857 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
>  db9268b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
>  4028e35 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  9704b33 
> 
> 
> Diff: https://reviews.apache.org/r/59391/diff/3/
> 
> 
> Testing
> ---
> 
> Unit tests pendig.
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 59391: Integrate RequestService resource and it's subresources with swagger

2017-05-22 Thread Attila Doroszlai


> On May 20, 2017, 9:10 a.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
> > Line 26 (original), 27 (patched)
> > 
> >
> > The "dummy" interface `RequestPostRequest` also defines a 
> > `RequestResourceFilter`.  Is this one really an `ApiModel`?
> 
> Balázs Bence Sári wrote:
> Th top level RequestResourceFilter class doesn't encapsulate all 
> information contained by the schema, hence the new one.

Yes, I understand that.  The question is whether we need the old one to be an 
`ApiModel`.


- Attila


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59391/#review175589
---


On May 22, 2017, 1:41 p.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59391/
> ---
> 
> (Updated May 22, 2017, 1:41 p.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jaimin Jetly, Oliver Szabo, 
> Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-21063
> https://issues.apache.org/jira/browse/AMBARI-21063
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Annotated RequrstServices and request/response models with Swagger 
> annotations. Sub-resources are skipped as Swagger doesn't support them out of 
> the box in their current form.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
>  936b857 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
>  db9268b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
>  4028e35 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  9704b33 
> 
> 
> Diff: https://reviews.apache.org/r/59391/diff/3/
> 
> 
> Testing
> ---
> 
> Unit tests pendig.
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 59391: Integrate RequestService resource and it's subresources with swagger

2017-05-22 Thread Balázs Bence Sári


> On May 20, 2017, 7:10 a.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
> > Line 26 (original), 27 (patched)
> > 
> >
> > The "dummy" interface `RequestPostRequest` also defines a 
> > `RequestResourceFilter`.  Is this one really an `ApiModel`?

Th top level RequestResourceFilter class doesn't encapsulate all information 
contained by the schema, hence the new one.


- Balázs Bence


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59391/#review175589
---


On May 22, 2017, 11:41 a.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59391/
> ---
> 
> (Updated May 22, 2017, 11:41 a.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jaimin Jetly, Oliver Szabo, 
> Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-21063
> https://issues.apache.org/jira/browse/AMBARI-21063
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Annotated RequrstServices and request/response models with Swagger 
> annotations. Sub-resources are skipped as Swagger doesn't support them out of 
> the box in their current form.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
>  936b857 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
>  db9268b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
>  4028e35 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  9704b33 
> 
> 
> Diff: https://reviews.apache.org/r/59391/diff/3/
> 
> 
> Testing
> ---
> 
> Unit tests pendig.
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 59391: Integrate RequestService resource and it's subresources with swagger

2017-05-22 Thread Balázs Bence Sári

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59391/
---

(Updated May 22, 2017, 11:41 a.m.)


Review request for Ambari, Attila Doroszlai, Jaimin Jetly, Oliver Szabo, Sumit 
Mohanty, and Sebastian Toader.


Changes
---

Review comments


Bugs: AMBARI-21063
https://issues.apache.org/jira/browse/AMBARI-21063


Repository: ambari


Description
---

Annotated RequrstServices and request/response models with Swagger annotations. 
Sub-resources are skipped as Swagger doesn't support them out of the box in 
their current form.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
 936b857 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
 db9268b 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
 4028e35 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
 9704b33 


Diff: https://reviews.apache.org/r/59391/diff/3/

Changes: https://reviews.apache.org/r/59391/diff/2-3/


Testing
---

Unit tests pendig.


Thanks,

Balázs Bence Sári



Re: Review Request 59391: Integrate RequestService resource and it's subresources with swagger

2017-05-20 Thread Attila Doroszlai

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59391/#review175589
---


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
Lines 127 (patched)


leftover nickname (this is `RequestService`, not `ServiceService`)



ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
Line 104 (original), 155 (patched)


Why add `@Produces` for methods that return a sub-resource?



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
Line 26 (original), 27 (patched)


The "dummy" interface `RequestPostRequest` also defines a 
`RequestResourceFilter`.  Is this one really an `ApiModel`?


- Attila Doroszlai


On May 19, 2017, 11:41 a.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59391/
> ---
> 
> (Updated May 19, 2017, 11:41 a.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jaimin Jetly, Oliver Szabo, 
> Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-21063
> https://issues.apache.org/jira/browse/AMBARI-21063
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Annotated RequrstServices and request/response models with Swagger 
> annotations. Sub-resources are skipped as Swagger doesn't support them out of 
> the box in their current form.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
>  936b857 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
>  db9268b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
>  4028e35 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  9704b33 
> 
> 
> Diff: https://reviews.apache.org/r/59391/diff/2/
> 
> 
> Testing
> ---
> 
> Unit tests pendig.
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 59391: Integrate RequestService resource and it's subresources with swagger

2017-05-19 Thread Oliver Szabo

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59391/#review175494
---


Ship it!




Ship It!

- Oliver Szabo


On May 19, 2017, 9:41 a.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59391/
> ---
> 
> (Updated May 19, 2017, 9:41 a.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jaimin Jetly, Oliver Szabo, 
> Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-21063
> https://issues.apache.org/jira/browse/AMBARI-21063
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Annotated RequrstServices and request/response models with Swagger 
> annotations. Sub-resources are skipped as Swagger doesn't support them out of 
> the box in their current form.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
>  936b857 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
>  db9268b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
>  4028e35 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  9704b33 
> 
> 
> Diff: https://reviews.apache.org/r/59391/diff/2/
> 
> 
> Testing
> ---
> 
> Unit tests pendig.
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 59391: Integrate RequestService resource and it's subresources with swagger

2017-05-19 Thread Sebastian Toader

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59391/#review175492
---


Ship it!




Ship It!

- Sebastian Toader


On May 19, 2017, 11:41 a.m., Balázs Bence Sári wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59391/
> ---
> 
> (Updated May 19, 2017, 11:41 a.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jaimin Jetly, Oliver Szabo, 
> Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-21063
> https://issues.apache.org/jira/browse/AMBARI-21063
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Annotated RequrstServices and request/response models with Swagger 
> annotations. Sub-resources are skipped as Swagger doesn't support them out of 
> the box in their current form.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
>  936b857 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
>  db9268b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
>  4028e35 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
>  9704b33 
> 
> 
> Diff: https://reviews.apache.org/r/59391/diff/2/
> 
> 
> Testing
> ---
> 
> Unit tests pendig.
> 
> 
> Thanks,
> 
> Balázs Bence Sári
> 
>



Re: Review Request 59391: Integrate RequestService resource and it's subresources with swagger

2017-05-19 Thread Balázs Bence Sári

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59391/
---

(Updated May 19, 2017, 9:41 a.m.)


Review request for Ambari, Attila Doroszlai, Jaimin Jetly, Oliver Szabo, Sumit 
Mohanty, and Sebastian Toader.


Bugs: AMBARI-21063
https://issues.apache.org/jira/browse/AMBARI-21063


Repository: ambari


Description
---

Annotated RequrstServices and request/response models with Swagger annotations. 
Sub-resources are skipped as Swagger doesn't support them out of the box in 
their current form.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
 936b857 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
 db9268b 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
 4028e35 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
 9704b33 


Diff: https://reviews.apache.org/r/59391/diff/2/

Changes: https://reviews.apache.org/r/59391/diff/1-2/


Testing
---

Unit tests pendig.


Thanks,

Balázs Bence Sári