Re: Swagger Doc and UI support (Was: Documentation to the official online site svn?)

2019-05-01 Thread DO YUNG YOON
Hi Woonsan.

Sorry for the late response. It took me for a while to figure out what
would be a nice way for working with OpenAPI document spec.

I agree with your two cents, especially the importance of generating rest
API reference through the right tool.

Here is the tools I played with a little bit.

- tapir: https://github.com/softwaremill/tapir
- endpoints: http://julienrf.github.io/endpoints/index.html

Personally, I prefer tapir, but it seems like it does not provide scala
2.11 available on maven central. I spent few days to upgrade scala version
from 2.11 to 2.12, but realize it is not that easy(we may need to open up a
separate discussion how we are going to upgrade scala version to 2.12).

so just played with endpoints at this point and just sharing it with you to
check if we are doing the right thing.

here is how to test this PR(
https://github.com/woonsan/incubator-s2graph/pull/1)

1. setup docker image on local for hbase.

cd dev_support; docker-compose up graph_hbase

2. run akka http server in dev environment.

sbt 'project s2http' '~reStart'

3. check the specs that generated by documentation server/spec.

http://localhost:8000/api-docs/documentation.json

4. check the AdminEndpoints

this is where our admin specs will reside on.
I added few more specs for listing service/label/serviceColumns etc to
validate if they are working.

ex)
- localhost:8000/admin/listServices
- localhost:8000/admin/listLabels
- localhost:8000/admin/listServiceColumns/s2graph

IMAO, The nice thing about the above two libraries is that it separates the
implementation and spec but still validate it on compile time, which I
prefer over the annotation approach.
I think it takes some time to get used to it for the first time, then after
struggling, the library shine and basically, help us to synchronize API and
doc so worth it.

Please review and give any comments.

On Wed, Apr 10, 2019 at 8:24 AM Woonsan Ko  wrote:

> On Mon, Apr 8, 2019 at 6:58 PM Woonsan Ko  wrote:
> >
> > Hi Daewon, Do Yung and/or anyone interested in,
> >
> > I've just submitted a PR which has the swagger UI support with the
> > default swagger document, initially for admin services:
> > - https://github.com/apache/incubator-s2graph/pull/197
> >
> > I think Swagger UI with the default swagger doc for the APIs will make
> > it easier for many devs.
> > Could you please review it?
> >
> > I figured out how to add /api-docs route there, but feel free to
> > correct it if I didn't follow any (Scala or Akka) best practices. ;-)
> >
> > As described in the PR description, the following operations work fine
> > with the examples:
> > - /admin/createService, /admin/createLabel, /admin/addIndex,
> > /admin/getLabel/{name}
> >
> > But, the following returns 404, for some reason which I can't figure out
> now:
> > - /admin/deleteLabel/{name}, /admin/addProp/{name},
> /admin/createServiceColumn
>
> I've pushed more and now those three are working fine.
> I've noticed that `/admin/deleteLabel/{name}` in documentation was
> changed to `/admin/deleteLabelReally/{name}` in code:
> -
> https://github.com/apache/incubator-s2graph/blob/master/s2http/src/main/scala/org/apache/s2graph/http/S2GraphAdminRoute.scala#L226
>
> There seems to be many in code outdating the documentation. For
> example, there are many undocumented operations too. e.g. renameLabel,
> copyLabel, swapLabel, etc.
>
> My two cents:
> If you folks like the OpenAPI (swagger) document and its UI, then I'd
> like to suggest you should keep the swagger doc as the single source
> of truth for internal/external developers who are using the APIs,
> always keeping it synchronized with the code. So, for example, if
> someone makes changes in the REST APIs, it must be affected in the
> OpenAPI (swagger) doc, too.
> And, consider generating rest api reference documentation through a
> tool like [1], and include or link those from the online
> documentation.
> Then you can minimize the risk of mismatch and outdated API references
> and confusing developers who want to use it.
>
> Regards,
>
> Woonsan
>
> [1]
> https://github.com/swagger-api/swagger-codegen#generating-static-html-api-documentation
>
> >
> > Kind regards,
> >
> > Woonsan
> >
> > On Thu, Mar 28, 2019 at 9:45 AM Woonsan Ko  wrote:
> > >
> > > On Thu, Mar 28, 2019 at 9:19 AM DO YUNG YOON  wrote:
> > > >
> > > > +1 for 'running' examples and would be happy to help if there is
> anything I
> > > > can help with.
> > > >
> > > > Also while I was going through the documentation to check if it is
> correct,
> > > > I found it is a bit tedious to copy payload on the doc to rest
> client(such
> > > > as postman).
> > > > I wish there was a documentation tool integration, such as swagger,
> which
> > > > also provides specs and UI to try each endpoint with examples.
> > > > I think integration with documentation tools is good for not only
> for users
> > > > but also developers who set up local development environments and
> fix code
> > > > and testing.
>

Re: It's time to report! (Was: Podling report due)

2019-05-01 Thread DO YUNG YOON
Hi all.

I just prepared the first version of the draft. Please review and let me
know what you think


S2Graph

S2Graph is a distributed and scalable OLTP graph database built on Apache
HBase to support fast traversal of extremely large graphs.

S2Graph has been incubating since 2015-11-29.

Three most important issues to address in the move towards graduation:

  1. Make the third release.
  2. Attract more users and contributors.
  3. Build the developer community in both size and diversity.

Any issues that the Incubator PMC (IPMC) or ASF Board wish/need to be aware
of?

  None

How has the community developed since the last report?

  * There were some discussions on the documentation of the project.
  * There were some questions and answers from the community about the
migration tool

How has the project developed since the last report?

  * Working on providing OpenAPI documentation for REST API.

How would you assess the podling's maturity?
Please feel free to add your own commentary.

  [ ] Initial setup
  [ ] Working towards first release
  [X] Community building
  [ ] Nearing graduation
  [ ] Other:

Date of last release:

  2017-08-26

When were the last committers or PPMC members elected?

Have your mentors been helpful and responsive or are things falling
through the cracks? In the latter case, please list any open issues
that need to be addressed.

* Our mentor is very helpful and responsive.

Signed-off-by:


On Wed, May 1, 2019 at 10:19 AM Woonsan Ko  wrote:

> Hi S2Graphe PPMC,
>
> Today May 1st is the expected due date to submit your podling project
> report.
>
> Just to repeat what Justin encouraged you folks several times already,
> - PPMC needs to submit the report until May 1st, in order to give all
> PPMC members and mentors enough time to review and discuss.
> - And all the PPMC reports are gathered and reviewed again by IPMC to
> submit to the board finally a week prior (May 8th) to the board
> meeting (on May 15th).
>
> Report submission (~May 1st) -> PPMC/Mentors/IPMC review (~May 8th) ->
> Board meeting (May 15th).
>
> If we delay it, IPMC won't have enough time to review and assess the
> status.
>
> So, could you draft and submit the report as soon as possible?
> Also, I encourage all PPMC members to review the report and discuss
> things if necessary.
>
> Kind regards,
>
> Woonsan
>
> -- Forwarded message -
> From: Justin Mclean 
> Date: Tue, Apr 30, 2019 at 8:44 PM
> Subject: Podling report due
> To: 
>
>
> Hi,
>
> Given the report date falls on the 1st this month we’re going to give
> codlings a couple of days (until Friday) to get them in.
>
> The report can be found here:
> https://cwiki.apache.org/confluence/display/INCUBATOR/May2019
>
> We still have the following reports to be filled in:
> ECharts
> Edgent
> Milagro
> S2Graph
> SDAP
> Tamaya
> Toree
> Training
> Tuweni
>
> I can see that Training is working on a a report.
>
> Thanks,
> Justin
> -
> To unsubscribe, e-mail: general-unsubscr...@incubator.apache.org
> For additional commands, e-mail: general-h...@incubator.apache.org
>