Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class AutocompleteControllerDoc
include Swagger::Blocks
swagger_path '/autocomplete.json' do
operation :get,
summary: 'Fetches autocompletes on Cards titles and tags',
description: 'Returns nearest completions for words in card titles and tags,'\
' respects card restrictions and privacy rules',
tags: ['autocomple'] do
parameter :page
extend SearchParams
extend SwaggerResponses::NotAuthorized
response 200, description: 'Autocomplete results' do
schema do
property :data do
property :cards_words, type: :array do
items type: :string
end
property :tags, type: :array do
items type: :string
end
property :types, type: :array do
items type: :string, enum: ['Doc', 'Link', 'Upload']
end
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment