221 lines
15 KiB
Plaintext
221 lines
15 KiB
Plaintext
{
|
|
"runtime": "NetCore31",
|
|
"defaultVariables": null,
|
|
"documentGenerator": {
|
|
"fromDocument": {
|
|
"json": "openapi: 3.0.3\ninfo:\n title: Command and Control Service\n description: This service s responsible for controlling and handling information\n about IoT devices in the Birbnetes system.\n contact:\n email: tormakristof@tormakristof.eu\n license:\n name: Apache 2.0\n url: http://www.apache.org/licenses/LICENSE-2.0.html\n version: 1.0.0\nservers:\n- url: https://birb.k8s.kmlabz.com\ntags:\n- name: cnc\n description: Command and Control Service interaction\npaths:\n /devices:\n get:\n tags:\n - cnc\n summary: Get all device info\n operationId: getall\n responses:\n 200:\n description: Array of devices\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/ListOfDevices'\n 404:\n description: No device found\n content: {}\n /devices/offline:\n post:\n tags:\n - cnc\n summary: Shut down all devices\n operationId: offlineall\n responses:\n 200:\n description: Message sent\n content: {}\n 500:\n description: Message sending unsuccessful\n content: {}\n /devices/online:\n post:\n tags:\n - cnc\n summary: Bring all devices online\n operationId: onlineall\n responses:\n 200:\n description: Message sent\n content: {}\n 500:\n description: Message sending unsuccessful\n content: {}\n /devices/{deviceID}:\n get:\n tags:\n - cnc\n summary: Get all device info\n operationId: getdevice\n parameters:\n - name: deviceID\n in: path\n description: ID of device to query\n required: true\n schema:\n type: string\n format: uuid\n responses:\n 200:\n description: Information about a particular device\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Device'\n 404:\n description: Device not found\n content: {}\n /devices/{deviceID}/offline:\n post:\n tags:\n - cnc\n summary: Shut down device\n operationId: offlinedevice\n parameters:\n - name: deviceID\n in: path\n description: ID of device to shut down\n required: true\n schema:\n type: string\n format: uuid\n responses:\n 200:\n description: Message sent\n content: {}\n 500:\n description: Message sending unsuccessful\n content: {}\n /devices/{deviceID}/online:\n post:\n tags:\n - cnc\n summary: Bring device online\n operationId: onlinedevice\n parameters:\n - name: deviceID\n in: path\n description: ID of device to bring online\n required: true\n schema:\n type: string\n format: uuid\n responses:\n 200:\n description: Message sent\n content: {}\n 500:\n description: Message sending unsuccessful\n content: {}\n /devices/{deviceID}/{sensorID}:\n get:\n tags:\n - cnc\n summary: Get info about a particular device's sensor\n operationId: getsensor\n parameters:\n - name: deviceID\n in: path\n description: ID of device to query\n required: true\n schema:\n type: string\n format: uuid\n - name: sensorID\n in: path\n description: ID of sensor to query\n required: true\n schema:\n type: string\n format: uuid\n responses:\n 200:\n description: Information about a sensor\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Sensor'\n 404:\n description: Device or sensor not found\n content: {}\n /devices/{deviceID}/{sensorID}/offline:\n post:\n tags:\n - cnc\n summary: Shut down sensor\n operationId: offlinesensor\n parameters:\n - name: deviceID\n in: path\n description: ID of device to query\n required: true\n schema:\n type: string\n format: uuid\n - name: sensorID\n in: path\n description: ID of sensor to query\n required: true\n schema:\n type: string\n format: uuid\n responses:\n 200:\n description: Message sent\n content: {}\n 500:\n description: Message sending unsuccessful\n content: {}\n /devices/{deviceID}/{sensorID}/online:\n post:\n tags:\n - cnc\n summary: Bring sensor online\n operationId: onlinesensor\n parameters:\n - name: deviceID\n in: path\n description: ID of device to query\n required: true\n schema:\n type: string\n format: uuid\n - name: sensorID\n in: path\n description: ID of sensor to query\n required: true\n schema:\n type: string\n format: uuid\n responses:\n 200:\n description: Message sent\n content: {}\n 500:\n description: Message sending unsuccessful\n content: {}\ncomponents:\n schemas:\n ListOfDevices:\n type: array\n items:\n $ref: '#/components/schemas/Device'\n Device:\n required:\n - id\n - sensors\n - status\n - url\n - coordinates\n type: object\n properties:\n id:\n type: string\n format: uuid\n status:\n type: string\n enum:\n - online\n - error\n - offline\n url:\n type: string\n format: url\n coordinates:\n required:\n - latitude\n - longitude\n type: object\n properties:\n latitude:\n type: number\n format: double\n longitude:\n type: number\n format: double\n sensors:\n $ref: '#/components/schemas/ArrayofSensors'\n ArrayofSensors:\n type: array\n items:\n $ref: '#/components/schemas/Sensor'\n Sensor:\n required:\n - id\n - status\n type: object\n properties:\n id:\n type: string\n format: uuid\n status:\n type: string\n enum:\n - online\n - unknown\n - offline",
|
|
"url": "https://git.kmlabz.com/birbnetes/swagger-docs/raw/branch/master/command-and-control.yml",
|
|
"output": null,
|
|
"newLineBehavior": "Auto"
|
|
}
|
|
},
|
|
"codeGenerators": {
|
|
"openApiToTypeScriptClient": {
|
|
"className": "DeviceService",
|
|
"moduleName": "",
|
|
"namespace": "",
|
|
"typeScriptVersion": 2.7,
|
|
"template": "Fetch",
|
|
"promiseType": "Promise",
|
|
"httpClass": "HttpClient",
|
|
"withCredentials": false,
|
|
"useSingletonProvider": false,
|
|
"injectionTokenType": "OpaqueToken",
|
|
"rxJsVersion": 6.0,
|
|
"dateTimeType": "Date",
|
|
"nullValue": "Undefined",
|
|
"generateClientClasses": true,
|
|
"generateClientInterfaces": false,
|
|
"generateOptionalParameters": false,
|
|
"exportTypes": true,
|
|
"wrapDtoExceptions": false,
|
|
"exceptionClass": "ApiException",
|
|
"clientBaseClass": null,
|
|
"wrapResponses": false,
|
|
"wrapResponseMethods": [],
|
|
"generateResponseClasses": true,
|
|
"responseClass": "SwaggerResponse",
|
|
"protectedMethods": [],
|
|
"configurationClass": null,
|
|
"useTransformOptionsMethod": false,
|
|
"useTransformResultMethod": false,
|
|
"generateDtoTypes": true,
|
|
"operationGenerationMode": "MultipleClientsFromOperationId",
|
|
"markOptionalProperties": true,
|
|
"generateCloneMethod": false,
|
|
"typeStyle": "Class",
|
|
"enumStyle": "Enum",
|
|
"useLeafType": false,
|
|
"classTypes": [],
|
|
"extendedClasses": [],
|
|
"extensionCode": null,
|
|
"generateDefaultValues": true,
|
|
"excludedTypeNames": [],
|
|
"excludedParameterNames": [],
|
|
"handleReferences": false,
|
|
"generateConstructorInterface": true,
|
|
"convertConstructorInterfaceData": false,
|
|
"importRequiredTypes": true,
|
|
"useGetBaseUrlMethod": false,
|
|
"baseUrlTokenName": "API_BASE_URL",
|
|
"queryNullValue": "",
|
|
"inlineNamedDictionaries": false,
|
|
"inlineNamedAny": false,
|
|
"templateDirectory": null,
|
|
"typeNameGeneratorType": null,
|
|
"propertyNameGeneratorType": null,
|
|
"enumNameGeneratorType": null,
|
|
"serviceHost": null,
|
|
"serviceSchemes": null,
|
|
"output": null,
|
|
"newLineBehavior": "Auto"
|
|
},
|
|
"openApiToCSharpClient": {
|
|
"clientBaseClass": null,
|
|
"configurationClass": null,
|
|
"generateClientClasses": true,
|
|
"generateClientInterfaces": true,
|
|
"clientBaseInterface": null,
|
|
"injectHttpClient": true,
|
|
"disposeHttpClient": true,
|
|
"protectedMethods": [],
|
|
"generateExceptionClasses": true,
|
|
"exceptionClass": "ApiException",
|
|
"wrapDtoExceptions": true,
|
|
"useHttpClientCreationMethod": false,
|
|
"httpClientType": "System.Net.Http.HttpClient",
|
|
"useHttpRequestMessageCreationMethod": false,
|
|
"useBaseUrl": true,
|
|
"generateBaseUrlProperty": true,
|
|
"generateSyncMethods": false,
|
|
"exposeJsonSerializerSettings": false,
|
|
"clientClassAccessModifier": "public",
|
|
"typeAccessModifier": "public",
|
|
"generateContractsOutput": false,
|
|
"contractsNamespace": null,
|
|
"contractsOutputFilePath": null,
|
|
"parameterDateTimeFormat": "s",
|
|
"parameterDateFormat": "yyyy-MM-dd",
|
|
"generateUpdateJsonSerializerSettingsMethod": true,
|
|
"useRequestAndResponseSerializationSettings": false,
|
|
"serializeTypeInformation": false,
|
|
"queryNullValue": "",
|
|
"className": "LiveDeviceService",
|
|
"operationGenerationMode": "MultipleClientsFromOperationId",
|
|
"additionalNamespaceUsages": [],
|
|
"additionalContractNamespaceUsages": [],
|
|
"generateOptionalParameters": false,
|
|
"generateJsonMethods": false,
|
|
"enforceFlagEnums": false,
|
|
"parameterArrayType": "System.Collections.Generic.IEnumerable",
|
|
"parameterDictionaryType": "System.Collections.Generic.IDictionary",
|
|
"responseArrayType": "System.Collections.Generic.ICollection",
|
|
"responseDictionaryType": "System.Collections.Generic.IDictionary",
|
|
"wrapResponses": false,
|
|
"wrapResponseMethods": [],
|
|
"generateResponseClasses": true,
|
|
"responseClass": "SwaggerResponse",
|
|
"namespace": "Birdmap.BLL.Services",
|
|
"requiredPropertiesMustBeDefined": true,
|
|
"dateType": "System.DateTimeOffset",
|
|
"jsonConverters": null,
|
|
"anyType": "object",
|
|
"dateTimeType": "System.DateTimeOffset",
|
|
"timeType": "System.TimeSpan",
|
|
"timeSpanType": "System.TimeSpan",
|
|
"arrayType": "System.Collections.Generic.ICollection",
|
|
"arrayInstanceType": "System.Collections.ObjectModel.Collection",
|
|
"dictionaryType": "System.Collections.Generic.IDictionary",
|
|
"dictionaryInstanceType": "System.Collections.Generic.Dictionary",
|
|
"arrayBaseType": "System.Collections.ObjectModel.Collection",
|
|
"dictionaryBaseType": "System.Collections.Generic.Dictionary",
|
|
"classStyle": "Poco",
|
|
"generateDefaultValues": true,
|
|
"generateDataAnnotations": true,
|
|
"excludedTypeNames": [],
|
|
"excludedParameterNames": [],
|
|
"handleReferences": false,
|
|
"generateImmutableArrayProperties": false,
|
|
"generateImmutableDictionaryProperties": false,
|
|
"jsonSerializerSettingsTransformationMethod": null,
|
|
"inlineNamedArrays": false,
|
|
"inlineNamedDictionaries": false,
|
|
"inlineNamedTuples": true,
|
|
"inlineNamedAny": false,
|
|
"generateDtoTypes": true,
|
|
"generateOptionalPropertiesAsNullable": false,
|
|
"generateNullableReferenceTypes": false,
|
|
"templateDirectory": null,
|
|
"typeNameGeneratorType": null,
|
|
"propertyNameGeneratorType": null,
|
|
"enumNameGeneratorType": null,
|
|
"serviceHost": null,
|
|
"serviceSchemes": null,
|
|
"output": null,
|
|
"newLineBehavior": "Auto"
|
|
},
|
|
"openApiToCSharpController": {
|
|
"controllerBaseClass": null,
|
|
"controllerStyle": "Partial",
|
|
"controllerTarget": "AspNetCore",
|
|
"useCancellationToken": false,
|
|
"useActionResultType": true,
|
|
"generateModelValidationAttributes": true,
|
|
"routeNamingStrategy": "None",
|
|
"basePath": null,
|
|
"className": "{controller}",
|
|
"operationGenerationMode": "MultipleClientsFromOperationId",
|
|
"additionalNamespaceUsages": [],
|
|
"additionalContractNamespaceUsages": [],
|
|
"generateOptionalParameters": false,
|
|
"generateJsonMethods": false,
|
|
"enforceFlagEnums": false,
|
|
"parameterArrayType": "System.Collections.Generic.IEnumerable",
|
|
"parameterDictionaryType": "System.Collections.Generic.IDictionary",
|
|
"responseArrayType": "System.Collections.Generic.ICollection",
|
|
"responseDictionaryType": "System.Collections.Generic.IDictionary",
|
|
"wrapResponses": false,
|
|
"wrapResponseMethods": [],
|
|
"generateResponseClasses": true,
|
|
"responseClass": "SwaggerResponse",
|
|
"namespace": "Birdmap.API.Controllers",
|
|
"requiredPropertiesMustBeDefined": true,
|
|
"dateType": "System.DateTimeOffset",
|
|
"jsonConverters": null,
|
|
"anyType": "object",
|
|
"dateTimeType": "System.DateTimeOffset",
|
|
"timeType": "System.TimeSpan",
|
|
"timeSpanType": "System.TimeSpan",
|
|
"arrayType": "System.Collections.Generic.List",
|
|
"arrayInstanceType": "System.Collections.Generic.List",
|
|
"dictionaryType": "System.Collections.Generic.IDictionary",
|
|
"dictionaryInstanceType": "System.Collections.Generic.Dictionary",
|
|
"arrayBaseType": "System.Collections.ObjectModel.Collection",
|
|
"dictionaryBaseType": "System.Collections.Generic.Dictionary",
|
|
"classStyle": "Poco",
|
|
"generateDefaultValues": true,
|
|
"generateDataAnnotations": true,
|
|
"excludedTypeNames": [],
|
|
"excludedParameterNames": [],
|
|
"handleReferences": false,
|
|
"generateImmutableArrayProperties": false,
|
|
"generateImmutableDictionaryProperties": false,
|
|
"jsonSerializerSettingsTransformationMethod": null,
|
|
"inlineNamedArrays": false,
|
|
"inlineNamedDictionaries": false,
|
|
"inlineNamedTuples": true,
|
|
"inlineNamedAny": false,
|
|
"generateDtoTypes": true,
|
|
"generateOptionalPropertiesAsNullable": false,
|
|
"generateNullableReferenceTypes": false,
|
|
"templateDirectory": null,
|
|
"typeNameGeneratorType": null,
|
|
"propertyNameGeneratorType": null,
|
|
"enumNameGeneratorType": null,
|
|
"serviceHost": null,
|
|
"serviceSchemes": null,
|
|
"output": null,
|
|
"newLineBehavior": "Auto"
|
|
}
|
|
}
|
|
} |