UNPKG

@novo-learning/novo-sdk

Version:

SDK for the Novolanguage Speech Analysis API

336 lines (335 loc) 13.2 kB
{ "openapi": "3.0.0", "paths": { "/v1/exercises": { "post": { "operationId": "createExercise", "summary": "", "description": "Create an exercise", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateExerciseDtoV1" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExerciseResponseDtoV1" } } } } }, "tags": ["exercises"], "security": [{ "exercise_edit": [] }] }, "get": { "operationId": "getExerciseList", "summary": "", "description": "Get a list of exercises", "parameters": [ { "name": "custom", "required": false, "in": "query", "description": "Filter applied on a custom property (can occur multiple times in the querystring). The filter value has the form \"key:value\" where the key can contain a \".\" to specify a subproperty within a custom property. Note: filter only works on string values", "schema": { "type": "string" } }, { "name": "exerciseType", "required": false, "in": "query", "description": "Filter on exercise type", "schema": { "enum": ["choice", "pronunciation", "word-cloud"], "type": "string" } }, { "name": "languageCode", "required": false, "in": "query", "description": "Filter on language", "schema": { "enum": ["ar-idn", "en", "nl", "zh", "fr", "de", "es"], "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ExerciseDescriptorDtoV1" } } } } } }, "tags": ["exercises"], "security": [{ "access_token": [] }] } }, "/v1/exercises/{id}": { "get": { "operationId": "getExercise", "summary": "", "description": "Get an exercise", "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExerciseResponseDtoV1" } } } }, "404": { "description": "Returned when the exercise with the specified id is not found", "content": { "application/json": { "schema": { "type": "string" } } } } }, "tags": ["exercises"], "security": [{ "access_token": [] }] }, "put": { "operationId": "replaceExercise", "summary": "", "description": "Replace an exercise ", "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReplaceExerciseDtoV1" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExerciseResponseDtoV1" } } } }, "404": { "description": "Returned when the exercise with the specified id is not found", "content": { "application/json": { "schema": { "type": "string" } } } } }, "tags": ["exercises"], "security": [{ "exercise_edit": [] }] }, "delete": { "operationId": "deleteExercise", "summary": "", "description": "Delete an exercise ", "parameters": [{ "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }], "responses": { "200": { "description": "" }, "404": { "description": "Returned when the exercise with the specified id is not found", "content": { "application/json": { "schema": { "type": "string" } } } } }, "tags": ["exercises"], "security": [{ "exercise_delete": [] }] } } }, "info": { "title": "Exercise API", "description": "The exericse API is used to store and retrieve exercises. Exercises stored in the exercise API are optimized for faster processing by the speech recognizer.", "version": "1.0", "contact": {} }, "tags": [{ "name": "exercises", "description": "" }], "servers": [], "components": { "securitySchemes": { "access_token": { "scheme": "bearer", "bearerFormat": "JWT", "type": "http", "description": "An auhtorized user" }, "exercise_edit": { "scheme": "bearer", "bearerFormat": "JWT", "type": "http", "description": "An authorized user with exercise_edit permission" }, "exercise_delete": { "scheme": "bearer", "bearerFormat": "JWT", "type": "http", "description": "An authorized user with exercise_delete permission" } }, "schemas": { "PhonemeEnableFeedbackDtoV1": { "type": "object", "properties": { "phoneme": { "type": "string", "description": "A phoneme representing the desired utterance" }, "evaluate": { "type": "boolean", "description": "Indicates if this phoneme is taken into account when determining the feedback, default true", "default": true } }, "required": ["phoneme"] }, "PhonemeListDtoV1": { "type": "object", "properties": { "phonemes": { "description": "A list of phonemes making up a pronunciation of a word", "type": "array", "items": { "$ref": "#/components/schemas/PhonemeEnableFeedbackDtoV1" } } }, "required": ["phonemes"] }, "WordDtoV1": { "type": "object", "properties": { "label": { "type": "string", "description": "A textual representation of a word" }, "correctPronunciations": { "description": "A list of pronunciations which are considered correct in the context of the exercise", "type": "array", "items": { "$ref": "#/components/schemas/PhonemeListDtoV1" } }, "incorrectPronunciations": { "description": "A list of pronunciations which are considered incorrect in the context of the exercise", "type": "array", "items": { "$ref": "#/components/schemas/PhonemeListDtoV1" } }, "liaisonPhoneme": { "type": "string", "description": "A phoneme which needs to be uttered at the end of the word due to its context in a sentence" }, "evaluate": { "type": "boolean", "default": true, "description": "Indicates if this word is taken into account when determining the feedback, default true" } }, "required": ["label", "correctPronunciations", "incorrectPronunciations"] }, "PronunciationDtoV1": { "type": "object", "properties": { "words": { "description": "The words which need to be pronounced in the exercise", "type": "array", "items": { "$ref": "#/components/schemas/WordDtoV1" } } }, "required": ["words"] }, "WordCloudDtoV1": { "type": "object", "properties": { "pronunciations": { "description": "The pronunciations which makeup this exercise", "type": "array", "items": { "$ref": "#/components/schemas/PronunciationDtoV1" } } }, "required": ["pronunciations"] }, "OptionWordDtoV1": { "type": "object", "properties": { "label": { "type": "string", "description": "A textual representation of a word" }, "pronunciations": { "description": "A list of pronunciations which are considered correct in the context of the exercise", "type": "array", "items": { "$ref": "#/components/schemas/PhonemeListDtoV1" } } }, "required": ["label", "pronunciations"] }, "OptionDtoV1": { "type": "object", "properties": { "label": { "type": "string", "description": "A textual representation of an option (text of at least one word)" }, "words": { "description": "A list of pronunciations of the words in this option", "type": "array", "items": { "$ref": "#/components/schemas/OptionWordDtoV1" } } }, "required": ["label", "words"] }, "ChoiceDtoV1": { "type": "object", "properties": { "correctOptions": { "description": "The correct option(s) in this choice exercise", "type": "array", "items": { "$ref": "#/components/schemas/OptionDtoV1" } }, "incorrectOptions": { "description": "The incorrect option(s) in this choice exercise", "type": "array", "items": { "$ref": "#/components/schemas/OptionDtoV1" } } }, "required": ["correctOptions"] }, "LanguageCode": { "type": "string", "enum": ["ar-idn", "en", "nl", "zh", "fr", "de", "es"] }, "ExerciseType": { "type": "string", "enum": ["choice", "pronunciation", "word-cloud"] }, "CreateExerciseDtoV1": { "type": "object", "properties": { "description": { "type": "string", "description": "A description of this exercise" }, "languageCode": { "description": "Target language", "$ref": "#/components/schemas/LanguageCode" }, "type": { "description": "The type of the exercise", "$ref": "#/components/schemas/ExerciseType" }, "exercise": { "oneOf": [ { "$ref": "#/components/schemas/PronunciationDtoV1" }, { "$ref": "#/components/schemas/ChoiceDtoV1" }, { "$ref": "#/components/schemas/WordCloudDtoV1" } ], "description": "The exercise" }, "customProperties": { "type": "object", "description": "Record with custom properties" } }, "required": ["description", "languageCode", "type", "exercise"] }, "ExerciseResponseDtoV1": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string", "description": "A description of this exercise" }, "languageCode": { "description": "Target language", "$ref": "#/components/schemas/LanguageCode" }, "type": { "description": "The type of the exercise", "$ref": "#/components/schemas/ExerciseType" }, "exercise": { "oneOf": [ { "$ref": "#/components/schemas/PronunciationDtoV1" }, { "$ref": "#/components/schemas/ChoiceDtoV1" }, { "$ref": "#/components/schemas/WordCloudDtoV1" } ], "description": "The exercise" }, "customProperties": { "type": "object", "description": "Record with custom properties" } }, "required": ["description", "languageCode", "type", "exercise"] }, "ExerciseDescriptorDtoV1": { "type": "object", "properties": { "id": { "type": "string" }, "description": { "type": "string" }, "languageCode": { "enum": ["ar-idn", "en", "nl", "zh", "fr", "de", "es"], "type": "string" }, "type": { "enum": ["choice", "pronunciation", "word-cloud"], "type": "string" } }, "required": ["id", "description", "languageCode", "type"] }, "ReplaceExerciseDtoV1": { "type": "object", "properties": { "description": { "type": "string", "description": "A description of this exercise" }, "languageCode": { "description": "Target language", "$ref": "#/components/schemas/LanguageCode" }, "type": { "description": "The type of the exercise", "$ref": "#/components/schemas/ExerciseType" }, "exercise": { "oneOf": [ { "$ref": "#/components/schemas/PronunciationDtoV1" }, { "$ref": "#/components/schemas/ChoiceDtoV1" }, { "$ref": "#/components/schemas/WordCloudDtoV1" } ], "description": "The exercise" }, "customProperties": { "type": "object", "description": "Record with custom properties" } }, "required": ["description", "languageCode", "type", "exercise"] } } } }