Skip to content

Commit

Permalink
Merge branch 'testapi'
Browse files Browse the repository at this point in the history
  • Loading branch information
lzy7071 committed Jun 22, 2020
2 parents d13e658 + b37e37f commit 06c6d5a
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
7 changes: 5 additions & 2 deletions datanator_rest_api/routes/ftx.py
Expand Up @@ -30,9 +30,12 @@ def get(query_message, iof, index, from_, size, fields):

class num_of_index:

def get(query_message, index, from_, size, fields):
def get(query_message, index, from_, size, fields,
includes, excludes):
print(includes)
r = f_manager.get_single_index_count(query_message, index, size,
fields=fields, from_=from_)
fields=fields, from_=from_,
includes=includes, excludes=excludes)
return r


Expand Down
19 changes: 19 additions & 0 deletions datanator_rest_api/spec/DatanatorAPI.yaml
Expand Up @@ -366,6 +366,25 @@ paths:
items:
type: string
type: array
- description: Fields to be included in returned data object
in: query
name: includes
required: false
schema:
default: []
items:
type: string
type: array
- description: Fields to be excluded from returned data object
in: query
name: excludes
required: false
schema:
default:
- s
items:
type: string
type: array
responses:
'200':
content:
Expand Down
18 changes: 18 additions & 0 deletions datanator_rest_api/spec/paths/ftx.yaml
Expand Up @@ -160,6 +160,24 @@ num_of_index:
'halflives.accession_id', 'identifier']
required: true
description: Fields in which the text search will be done
- in: query
name: includes
schema:
type: array
items:
type: string
default: []
required: false
description: Fields to be included in returned data object
- in: query
name: excludes
schema:
type: array
items:
type: string
default: ["s"]
required: false
description: Fields to be excluded from returned data object
tags:
- FTX
summary: Search for number hits in a particular index
Expand Down

0 comments on commit 06c6d5a

Please sign in to comment.