O'Reilly logo

Distributed Computing with Go by V.N. Nikhil Anurag

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Goophr Concierge API definition

Goophr Concierge is the user-facing component, and it has two responsibilities—to index new documents and to return query results. Informally, we can define the API as follows:

  • /api/feeder: This is the API endpoint to upload documents by user
    • The POST request adds new documents if the payload is complete and correct
  • /api/query: The user searches for phrases or terms that are queried against this API endpoint
    • The POST request contains payload with search terms, and a list of documents will be returned

This simple API description is for our understanding. Now let's look at how this would be formulated using the OpenAPI specification:

# openapi/concierge.yamlopenapi: 3.0.0 servers: - url: /api info: title: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required