모범 사례 및 튜토리얼

Managing REST APIs with Swagger (video)

카우치베이스 incorporated Swagger into our documentation a few months ago. “Swagger” refers to an ecosystem of tools and other resources for managing REST APIs.

Core to Swagger is the Swagger specification. (The group behind Swagger donated the spec to the OpenAPI Initiative. The original site, swagger.io remains the main site for tools and such.)

Once you have the API spec defined for you endpoints, you get several valuable capabilities. My two favorite are the “live” embeddable documentation and the client libraries. Take a look at this short video for a demonstration of some of the features of Swagger.
[youtube https://www.youtube.com/watch?v=0UWiE-c9Nds&w=560&h=315]
For an example of using a Swagger JavaScript client, take a look at this blog post: https://www.couchbase.com/blog/node-js-swagger-monitor-document-changes-couchbase-mobile/

You can find the Swagger specs for the Sync Gateway public API 여기, and the admin API 여기.

Here are the Sync Gateway configurations I refer to in the video. The first has the CORS configuration to allow access from swagger.io.

The second is for trying out calls through our live documentation.

(Note: There’s currently a known issue with making the calls from the Couchbase documentation. Couchbase now requires access via https, in keeping with security best practices. This means the documentation also redirects using https. This means you have to set up Sync Gateway to use SSL. See the documentation 여기 for more information.)

추신

Download Couchbase and Sync Gateway 여기. See our 문서화 for how to add Couchbase Lite to a project.

저희 쪽에서 더 많은 자료를 확인해 보세요 개발자 포털 그리고 트위터에서도 팔로우하세요 @CouchbaseDev.

당사는 다음 곳에 질문을 게시할 수 있습니다. 포럼. 그리고 우리는 적극적으로 참여합니다 스택 오버플로.

Hit me up on Twitter with any questions, comments, topics you’d like to see, etc. @HodGreeley

이 기사 공유하기

작가

Hod Greeley는 실리콘 밸리에 거주하는 카우치베이스의 개발자 애드보킷(Developer Advocate)입니다. 그는 소프트웨어 엔지니어 및 엔지니어링 매니저로 20년 이상의 경력을 가지고 있습니다. 그는 전산 물리학 및 화학, 컴퓨터 및 네트워크 보안, 금융, 모바일 등 다양한 소프트웨어 분야에서 일해 왔습니다. 2016년 카우치베이스에 합류하기 전에는 삼성에서 모바일 개발자 관계(developer relations)를 이끌었습니다. Hod는 컬럼비아 대학에서 화학물리학 박사 학위를 받았습니다.

댓글 남기기

카우치베이스 카펠라를 시작할 준비가 되셨나요?

개발 시작하기

NoSQL을 탐색하고, 리소스를 찾아보고, 튜토리얼을 시작하려면 개발자 포털을 확인하세요.

카펠라 프리 사용하기

단 몇 번의 클릭으로 카우치베이스(Couchbase)를 직접 체험해 보세요. Capella DBaaS는 시작하기 가장 쉽고 빠른 방법입니다.

연락해

Couchbase 제품군에 대해 더 알고 싶으신가요? 저희가 도와드리겠습니다.