Skip to content

Commit

Permalink
Merge branch 'develop' into documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
uo288347 committed Apr 28, 2024
2 parents caa79c2 + 2e258c7 commit 812a0b2
Show file tree
Hide file tree
Showing 32 changed files with 989 additions and 489 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Wikidata Infinite Quest
🌐 [wikiquest.sytes.net](http://wikiquest.sytes.net/)
⚠️ If you entered the site time ago it requires log out and log in one time to remove errors.
## 👨‍💻 Contributors:

| Contributor | Contact |
Expand Down
118 changes: 118 additions & 0 deletions gatewayservice/apis/questions-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
openapi: 3.0.0
info:
title: Questionservice API
description: Question OpenAPI specification
version: 1.0.0
servers:
# Added by API Auto Mocking Plugin
- description: SwaggerHub API Auto Mocking
url: https://virtserver.swaggerhub.com/UO288347_1/questions-api/1.0.0
- url: http://localhost:8000
description: Development server
- url: http://20.19.89.97:8000
description: Production server
paths:
/questions/:lang:
get:
summary: Gests a question from the database.
operationId: questions
description: Gests a question from the database. If there are not enough questions, it asks wikidata for more
responses:
'200':
description: Returned question succesfully
content:
application/json:
schema:
type: object
properties:
_id:
type: string
description: Unique identification
example: 660549daa56f92f15a73f89c
question:
type: string
options:
type: array
items:
type: string
correctAnswer:
type: string
categories:
type: array
items:
type: string
language:
type: string
'400':
description: Failed to get question
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error while getting a question.
'500':
description: Internal server error.
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error information.
example: Internal Server Error
/questions/:lang/:category:
get:
summary: Gests a question from a specified category.
operationId: questionsByCategory
description: Gests a question from the database of a specified category. If there are not enough questions, it asks wikidata for more
responses:
'200':
description: Returned question succesfully
content:
application/json:
schema:
type: object
properties:
_id:
type: string
description: Unique identification
example: 660549daa56f92f15a73f89c
question:
type: string
options:
type: array
items:
type: string
correctAnswer:
type: string
categories:
type: array
items:
type: string
language:
type: string
'400':
description: Failed to get question
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error while getting a question.
'500':
description: Internal server error.
content:
application/json:
schema:
type: object
properties:
error:
type: string
description: Error information.
example: Internal Server Error
Loading

0 comments on commit 812a0b2

Please sign in to comment.