Git Product home page Git Product logo

Comments (7)

krapie avatar krapie commented on September 2, 2024 2

@devleejb Yes, just like Firebase.

Screenshot 2024-03-04 at 8 20 39 PM

Edit: liveblocks API references seems to be the perfect example :)

from yorkie.

hackerwins avatar hackerwins commented on September 2, 2024 2

We can also refer to the following:

from yorkie.

hackerwins avatar hackerwins commented on September 2, 2024 2

@devleejb Sure. You're a maintainer of this project.

from yorkie.

krapie avatar krapie commented on September 2, 2024 1

We might want to add this to our documentation for API usage 👍🏼

from yorkie.

devleejb avatar devleejb commented on September 2, 2024 1

Can I try it?

from yorkie.

devleejb avatar devleejb commented on September 2, 2024 1

I've made the modifications in buf.gen.yaml:

version: v1
plugins:
  - plugin: go
    out: api
    opt: paths=source_relative
  - plugin: connect-go
    out: api
    opt: paths=source_relative
  - plugin: connect-openapi
    out: api/docs
    opt:
      - base=api/docs/yorkie.base.yaml

The generated OpenAPI Spec can be served using the Swagger UI container, and I've added the corresponding command to the Makefile:

docker-swagger:
	docker run -p 3000:8080 \
  		-e URLS="[ \
			{ url: 'docs/yorkie/v1/admin.openapi.yaml', name: 'Admin' }, \
			{ url: 'docs/yorkie/v1/resources.openapi.yaml', name: 'Resources' }, \
			{ url: 'docs/yorkie/v1/yorkie.openapi.yaml', name: 'Yorkie' }  \
		]" \
		-v `pwd`/api/docs:/usr/share/nginx/html/docs/ \
  		swaggerapi/swagger-ui

As a result, when accessing the served documents, they will be displayed as shown in the image below:

image

However, adding the Authentication option in the connect-openapi library causes an error. I have reported this issue to the library's repository and will create a PR after resolving it.
Link to the GitHub Issue

After incorporating these changes, the following updates are required for the Yorkie Document:

  • List additional endpoints to be added to the document.
  • Write markdown documentation based on the OpenAPI Spec (considering automation).

from yorkie.

devleejb avatar devleejb commented on September 2, 2024

@krapie
Does the documentation mean Yorkie Docs, right?

from yorkie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.