Although snake_case improves readability, camelCase is actively enforced with style guidelines for Java. So it would be best to keep using camelCase to maintain a consistent code base.
Regards, Chamila de Alwis Software Engineer | WSO2 | +94772207163 Blog: code.chamiladealwis.com On Mon, Oct 6, 2014 at 10:46 AM, Dinesh Bandara <dine...@wso2.com> wrote: > I think it is better to use camelCase since we are using java as our > underline language > > On Mon, Oct 6, 2014 at 10:05 AM, Gayan Gunarathne <gay...@wso2.com> wrote: > >> I think camelcase is better as we are using java for developed the REST >> API.I guess lot of APIs use this as they following naming conventions of >> the underlying language they are using.Also there are some arguments that >> snake-case will improve the readability , it may help when documentation >> and samples.But again it will be conflict with our underline naming >> convention. WDYT? >> >> Thanks, >> Gayan >> >> >> On Mon, Oct 6, 2014 at 7:32 AM, Nirmal Fernando <nirmal070...@gmail.com> >> wrote: >> >>> Thanks guys for the pointers. I'll create Jiras for all of these. >>> >>> On Mon, Oct 6, 2014 at 12:00 AM, Isuru Perera <isu...@wso2.com> wrote: >>> >>>> I also agree with all points. >>>> >>>> On Sun, Oct 5, 2014 at 11:09 PM, Akila Ravihansa Perera < >>>> raviha...@wso2.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> +1 for all the suggested points. >>>>> >>>>> I would like to add few more to the list to be considered. >>>>> >>>>> 1. Provide useful error messages for back-end API exceptions. >>>>> >>>>> 2. Use of snake_case instead of camelCase in APIs. It is much more >>>>> readable. >>>>> >>>> >>> Do you have any concrete cases where people have used snake-case? I >>> found Google Kubernetes API is also using camel case: >>> http://cdn.rawgit.com/GoogleCloudPlatform/kubernetes/31a0daae3627c91bc96e1f02a6344cd76e294791/api/kubernetes.html >>> >>>> >>>>> 3. Support gzip compression. >>>>> >>>>> 4. Enable Cross-site Resource Sharing. We cannot make an API call to >>>>> Stratos REST API through Javascript without this. >>>>> >>>> +1. I also faced this issue and Stratos APIs were failing when invoking >>>> via an application using node.js/jQuery. >>>> >>>>> >>>>> >>>>> >>>>> On Sun, Oct 5, 2014 at 9:27 PM, Nirmal Fernando < >>>>> nirmal070...@gmail.com> wrote: >>>>> > All, >>>>> > >>>>> > Let's discuss how we could do $subject properly. AFAIS currently we >>>>> don't >>>>> > have any versioning in our REST API, but we have consumers of our >>>>> REST API. >>>>> > >>>>> > 1. We can make the default API version to be the latest version, >>>>> i.e. v2. >>>>> > >>>>> > So, if someone send a request to /<rootContext>/cartridges , it >>>>> would find >>>>> > /<rootContext>/v2/cartridges >>>>> > >>>>> > 2. Anyone can use the default API paths and still could request for a >>>>> > specific version via HTTP Accept Header. >>>>> > >>>>> > Accept: application/vnd.stratos.v1+json >>>>> > >>>>> > >>>>> > 3. Provide a migration guide for existing Clients. >>>>> > >>>>> > - If they want to use the old API, they need to specifically request >>>>> for the >>>>> > old API, by specifying the Accept header. >>>>> > >>>>> > 4. Mark v1 API as deprecated and announce that we'll remove the >>>>> support for >>>>> > it in the next release. >>>>> > >>>>> > Any other alternatives? >>>>> > >>>>> > >>>>> > -- >>>>> > Best Regards, >>>>> > Nirmal >>>>> > >>>>> > Nirmal Fernando. >>>>> > PPMC Member & Committer of Apache Stratos, >>>>> > Senior Software Engineer, WSO2 Inc. >>>>> > >>>>> > Blog: http://nirmalfdo.blogspot.com/ >>>>> >>>>> >>>>> >>>>> -- >>>>> Akila Ravihansa Perera >>>>> Software Engineer, WSO2 >>>>> >>>>> Blog: http://ravihansa3000.blogspot.com >>>>> >>>> >>>> >>>> >>>> -- >>>> Isuru Perera >>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/ >>>> Lean . Enterprise . Middleware >>>> >>>> about.me/chrishantha >>>> >>> >>> >>> >>> -- >>> Best Regards, >>> Nirmal >>> >>> Nirmal Fernando. >>> PPMC Member & Committer of Apache Stratos, >>> Senior Software Engineer, WSO2 Inc. >>> >>> Blog: http://nirmalfdo.blogspot.com/ >>> >> >> >> >> -- >> Best Regards, >> >> Gayan Gunarathne >> Technical Lead >> WSO2 Inc. (http://wso2.com) >> email : gay...@wso2.com | mobile : +94 766819985 >> >> > > > > -- > *Dinesh Bandara* > Software Engineer > WSO2 Inc.; http://wso2.com > lean.enterprise.middleware > >