[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-13 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16950627#comment-16950627
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 5b6561eadb522150c8ea2954d60077ac445ad1d7 in lucene-solr's branch 
refs/heads/jira/SOLR-13731 from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=5b6561e ]

SOLR-13787: Support for Payload as 3rd param


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
> Fix For: master (9.0), 8.3
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-13 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16950626#comment-16950626
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 2d32f0b5a6567cdea72181ebaa4ddd2af9421093 in lucene-solr's branch 
refs/heads/jira/SOLR-13731 from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=2d32f0b ]

SOLR-13787: Added support for PayLoad as 3rd param


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
> Fix For: master (9.0), 8.3
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-13 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16950632#comment-16950632
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 84126ea0eae452ff3cebbd5eb2b7d94573eb841e in lucene-solr's branch 
refs/heads/jira/SOLR-13731 from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=84126ea ]

SOLR-13787: Better error logging


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
> Fix For: master (9.0), 8.3
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-11 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949918#comment-16949918
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 83c80376fa57f7218b45735dd39316684f68db4c in lucene-solr's branch 
refs/heads/branch_8x from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=83c8037 ]

SOLR-13787: Better error logging


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
> Fix For: master (9.0), 8.3
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-11 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949917#comment-16949917
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 84126ea0eae452ff3cebbd5eb2b7d94573eb841e in lucene-solr's branch 
refs/heads/master from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=84126ea ]

SOLR-13787: Better error logging


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
> Fix For: master (9.0), 8.3
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-11 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949900#comment-16949900
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 4c67f1645ea4e21d0a2fbaaa084c5433faffc751 in lucene-solr's branch 
refs/heads/branch_8_3 from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=4c67f16 ]

SOLR-13787: Better error logging


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
> Fix For: master (9.0), 8.3
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-11 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949455#comment-16949455
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 5b6561eadb522150c8ea2954d60077ac445ad1d7 in lucene-solr's branch 
refs/heads/master from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=5b6561e ]

SOLR-13787: Support for Payload as 3rd param


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
> Fix For: master (9.0), 8.3
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-11 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949453#comment-16949453
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit dcb7abfc0ee3e9ac8827bf7b0128f1249fb7fc7e in lucene-solr's branch 
refs/heads/branch_8x from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=dcb7abf ]

SOLR-13787: Added support for PayLoad as 3rd param


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
> Fix For: master (9.0), 8.3
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-11 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949454#comment-16949454
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 71e9564e0d520449b6eeb52a6f67ede91ff091a7 in lucene-solr's branch 
refs/heads/branch_8x from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=71e9564 ]

SOLR-13787: Support for Payload as 3rd param


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
> Fix For: master (9.0), 8.3
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-06 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16945480#comment-16945480
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit bb3d4e41f0125c06bf3c5cdc580c1fbe563d48e2 in lucene-solr's branch 
refs/heads/branch_8x from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=bb3d4e4 ]

SOLR-13787: An annotation based system to write v2  APIs 

This is to make V2 APIs easier to write and less error prone
* All specs are always in sync with code
* specs are generated from code
*  no need to learn and write json schema 

> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Sub-task
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-06 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16945478#comment-16945478
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit c5dc671aa304292fb71c793d3b5331afb2cc6e28 in lucene-solr's branch 
refs/heads/master from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=c5dc671 ]

SOLR-13787: An annotation based system to write v2  APIs 

This is to make V2 APIs easier to write and less error prone
* All specs are always in sync with code
* specs are generated from code
*  no need to learn and write json schema 

> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Sub-task
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-06 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16945477#comment-16945477
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 35f9ce795ee0866a606ec62c2e189011d5bcfedf in lucene-solr's branch 
refs/heads/jira/SOLR-13787 from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=35f9ce7 ]

SOLR-13787: more javadocs


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Sub-task
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-06 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16945476#comment-16945476
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 31b4dacb19def6f744263ebd480c5a21bf5f32dd in lucene-solr's branch 
refs/heads/jira/SOLR-13787 from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=31b4dac ]

SOLR-13787: Incorporated the review comment changes


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Sub-task
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-06 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16945468#comment-16945468
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 99b9b6b03a9d537f31992000aa3e59a1f468b786 in lucene-solr's branch 
refs/heads/jira/SOLR-13787 from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=99b9b6b ]

Merge branch 'master' into jira/SOLR-13787

merge with master


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Sub-task
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-05 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16945171#comment-16945171
 ] 

ASF subversion and git services commented on SOLR-13787:


Commit 375d02b3758c9d8c028194ca6c57dc73466dd0c8 in lucene-solr's branch 
refs/heads/jira/SOLR-13787 from Noble Paul
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=375d02b ]

SOLR-13787: An annotation based system to write v2 only APIs


> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Task
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
>
> example v2 API may look as follows
> {code:java}
> @V2EndPoint(method = POST, path = "/cluster/package", permission = 
> PermissionNameProvider.Name.ALL)
> public static class ApiTest {
>   @Command(name = "add")
>   public void add(SolrQueryRequest req, SolrQueryResponse rsp, AddVersion 
> addVersion) {
>   }
>   @Command(name = "delete")
>   public void del(SolrQueryRequest req, SolrQueryResponse rsp, List 
> names) {
>   }
> }
> public static class AddVersion {
>   @JsonProperty(value = "package", required = true)
>   public String pkg;
>   @JsonProperty(value = "version", required = true)
>   public String version;
>   @JsonProperty(value = "files", required = true)
>   public List files;
> }
> {code}
> This expects you to already hava a POJO annotated with jackson annotations
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-10-03 Thread Noble Paul (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16944195#comment-16944195
 ] 

Noble Paul commented on SOLR-13787:
---

I've changed the annotations a bit. If you do not have a proper json payload  
command like the schema API or config API, you do not need a schema. Everything 
can be done with annotations. In the absence of json schema for a command the 
introspect may not be able to give out the schema of the payload but everything 
can work without a schema 

> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Task
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
>
> example v2 API may look as follows
> {code:java}
> @EndPoint(
>  path = "/api/cluster/package",
>  method = POST,
>  permission = PKG_EDIT
> )
> static class PkgEdit {
>  @Command(name = "add", jsonSchema = "cluster.package.add.json")
>  public void add(CallInfo callInfo) throws Exception {
>  }
>  @Command(name = "update", jsonSchema = "cluster.package.update.json")
>  public void update(CallInfo callInfo) throws Exception {
> }
>  @Command(name = "delete", jsonSchema = "cluster.package.delete.json")
>  boolean deletePackage(CallInfo params) throws Exception {
> }
> {code}
> This expects you to already have the API spec json 
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
> /**The suoported http methods*/
>   SolrRequest.METHOD[] method();
> /**supported paths*/
>   String[] path();
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>/**if this is not a json command , leave it empty.
>* Keep in mind that you cannot have duplicates.
>* Only one method per name
>*
>*/
>   String name() default "";
>   String jsonSchema() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-09-25 Thread Noble Paul (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16937932#comment-16937932
 ] 

Noble Paul commented on SOLR-13787:
---

This is not a wholesale rewrite of v2 APIs.

Basically, there are 2 types of v2 APIs. 
 # Without a json payload
 # With a json payload

#1 can avoid a spec file and we can avoid it. 

#2 would need a spec file which contains the json schema of the payload. The 
schema is best expressed in json schema format.

> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Task
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
>
> example v2 API may look as follows
> {code:java}
> @EndPoint(
>  spec = "cluster.package",
>  method = POST,
>  permission = PKG_EDIT
> )
> static class PkgEdit {
>  @Command(name = "add")
>  public void add(CallInfo callInfo) throws Exception {
>  }
>  @Command(name = "update")
>  public void update(CallInfo callInfo) throws Exception {
> }
>  @Command(name = "delete")
>  boolean deletePackage(CallInfo params) throws Exception {
> }
> {code}
> This expects you to already have the API spec json 
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
>   /**name of the API spec file without the '.json' suffix
>*/
>   String spec();
>   /**Http method
>*/
>   SolrRequest.METHOD method();
>   /**The well known persmission name if any
>*/
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-09-25 Thread Anshum Gupta (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16937887#comment-16937887
 ] 

Anshum Gupta commented on SOLR-13787:
-

[~noble.paul] - for the sake of clarity, can you add some more context the 
annotations, as well as the spec file? If there's already a sample or document 
available outside of this JIRA, a link would do.

Considering that the last time I took a look at and/or did anything with v2 
APIs was a while ago, I feel this might be a little complicated for what you 
are trying to accomplish. At the same time, I may be wrong here and some 
documentation about the annotation/spec file would make things better w.r.t. 
understanding this proposal.

> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Task
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
>
> example v2 API may look as follows
> {code:java}
> @EndPoint(
>  spec = "cluster.package",
>  method = POST,
>  permission = PKG_EDIT
> )
> static class PkgEdit {
>  @Command(name = "add")
>  public void add(CallInfo callInfo) throws Exception {
>  }
>  @Command(name = "update")
>  public void update(CallInfo callInfo) throws Exception {
> }
>  @Command(name = "delete")
>  boolean deletePackage(CallInfo params) throws Exception {
> }
> {code}
> This expects you to already have the API spec json 
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
>   /**name of the API spec file without the '.json' suffix
>*/
>   String spec();
>   /**Http method
>*/
>   SolrRequest.METHOD method();
>   /**The well known persmission name if any
>*/
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org



[jira] [Commented] (SOLR-13787) An annotation based system to write v2 only APIs

2019-09-25 Thread Andrzej Bialecki (Jira)


[ 
https://issues.apache.org/jira/browse/SOLR-13787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16937733#comment-16937733
 ] 

Andrzej Bialecki  commented on SOLR-13787:
--

I think the idea that we discussed during the committer's meeting was to 
eliminate the need for creating JSON specs. As it is this proposal adds 
complexity because now you need to both annotate *and* create a spec file. 

> An annotation based system to write v2 only APIs
> 
>
> Key: SOLR-13787
> URL: https://issues.apache.org/jira/browse/SOLR-13787
> Project: Solr
>  Issue Type: Task
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Noble Paul
>Assignee: Noble Paul
>Priority: Major
>
> example v2 API may look as follows
> {code:java}
> @EndPoint(
>  spec = "cluster.package",
>  method = POST,
>  permission = PKG_EDIT
> )
> static class PkgEdit {
>  @Command(name = "add")
>  public void add(CallInfo callInfo) throws Exception {
>  }
>  @Command(name = "update")
>  public void update(CallInfo callInfo) throws Exception {
> }
>  @Command(name = "delete")
>  boolean deletePackage(CallInfo params) throws Exception {
> }
> {code}
> This expects you to already have the API spec json 
>  
> The annotations are:
>  
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target({ElementType.TYPE})
> public @interface EndPoint {
>   /**name of the API spec file without the '.json' suffix
>*/
>   String spec();
>   /**Http method
>*/
>   SolrRequest.METHOD method();
>   /**The well known persmission name if any
>*/
>   PermissionNameProvider.Name permission();
> }
> {code}
> {code:java}
> @Retention(RetentionPolicy.RUNTIME)
> @Target(ElementType.METHOD)
> public @interface Command {
>   String name() default "";
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org