1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-06-21 19:15:39 -04:00

Compare commits

..

No commits in common. "f7b9727ef993c0f50ed2dc558dbde911d72a6000" and "89d7fe736f99a48b0a5ec95050025ef28646b4c7" have entirely different histories.

31 changed files with 88 additions and 130 deletions

View File

@ -135,12 +135,10 @@
<file>webapi/doc/swagger/include/VORLocalizer.yaml</file>
<file>webapi/doc/swagger/include/WFMDemod.yaml</file>
<file>webapi/doc/swagger/include/WFMMod.yaml</file>
<file>webapi/doc/swagger/include/WDSPRx.yaml</file>
<file>webapi/doc/swagger/include/Xtrx.yaml</file>
<file>webapi/doc/swagger-ui/favicon-16x16.png</file>
<file>webapi/doc/swagger-ui/favicon-32x32.png</file>
<file>webapi/doc/swagger-ui/index.html</file>
<file>webapi/doc/swagger-ui/index.css</file>
<file>webapi/doc/swagger-ui/oauth2-redirect.html</file>
<file>webapi/doc/swagger-ui/swagger-ui-bundle.js</file>
<file>webapi/doc/swagger-ui/swagger-ui-bundle.js.map</file>
@ -150,7 +148,6 @@
<file>webapi/doc/swagger-ui/swagger-ui-es-bundle.js.map</file>
<file>webapi/doc/swagger-ui/swagger-ui-standalone-preset.js.map</file>
<file>webapi/doc/swagger-ui/swagger-ui-standalone-preset.js</file>
<file>webapi/doc/swagger-ui/swagger-initializer.js</file>
<file>webapi/doc/swagger-ui/swagger-ui.css</file>
<file>webapi/doc/swagger-ui/swagger-ui.css.map</file>
<file>webapi/doc/swagger-ui/swagger-ui.js</file>

View File

@ -5530,7 +5530,6 @@ margin-bottom: 20px;
"description" : "List of DV serial devices available in the system"
};
defs.DemodAnalyzerActions = {
"required" : [ "channelId", "deviceId" ],
"properties" : {
"deviceId" : {
"type" : "integer",
@ -10588,7 +10587,6 @@ margin-bottom: 20px;
"description" : "MetisMISOSettings"
};
defs.MorseDecoderActions = {
"required" : [ "channelId", "deviceId" ],
"properties" : {
"deviceId" : {
"type" : "integer",
@ -13259,12 +13257,10 @@ margin-bottom: 20px;
"type" : "integer"
},
"deviceIndex" : {
"type" : "integer",
"description" : "remote SDRangel instance deviceset index"
"type" : "integer"
},
"channelIndex" : {
"type" : "integer",
"description" : "remote SDRangel instance channel index"
"type" : "integer"
},
"useReverseAPI" : {
"type" : "integer",
@ -17234,8 +17230,7 @@ margin-bottom: 20px;
},
"nbLeadTime" : {
"type" : "number",
"format" : "float",
"description" : "Advance time (s)"
"format" : "float"
},
"nbLagTime" : {
"type" : "number",
@ -59477,7 +59472,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2025-05-29T12:27:25.321+02:00
Generated 2025-05-03T17:59:40.379+02:00
</div>
</div>
</div>

View File

@ -1,16 +0,0 @@
html {
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 0;
background: #fafafa;
}

View File

@ -4,14 +4,35 @@
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
<link rel="stylesheet" type="text/css" href="index.css" />
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
<style>
html
{
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
*,
*:before,
*:after
{
box-sizing: inherit;
}
body
{
margin:0;
background: #fafafa;
}
</style>
</head>
<body>
<div id="swagger-ui"></div>
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script>

View File

@ -4,6 +4,8 @@
<title>Swagger UI: OAuth2 Redirect</title>
</head>
<body>
</body>
</html>
<script>
'use strict';
function run () {
@ -13,32 +15,31 @@
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1).replace('?', '&');
qp = window.location.hash.substring(1);
} else {
qp = location.search.substring(1);
}
arr = qp.split("&");
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
arr = qp.split("&")
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
qp = qp ? JSON.parse('{' + arr.join() + '}',
function (key, value) {
return key === "" ? value : decodeURIComponent(value);
return key === "" ? value : decodeURIComponent(value)
}
) : {};
) : {}
isValid = qp.state === sentState;
isValid = qp.state === sentState
if ((
oauth2.auth.schema.get("flow") === "accessCode" ||
oauth2.auth.schema.get("flow") === "authorizationCode" ||
oauth2.auth.schema.get("flow") === "authorization_code"
oauth2.auth.schema.get("flow") === "accessCode"||
oauth2.auth.schema.get("flow") === "authorizationCode"
) && !oauth2.auth.code) {
if (!isValid) {
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
});
}
@ -47,7 +48,7 @@
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg;
let oauthErrorMsg
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
@ -58,7 +59,7 @@
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
});
}
} else {
@ -67,13 +68,7 @@
window.close();
}
if (document.readyState !== 'loading') {
run();
} else {
document.addEventListener('DOMContentLoaded', function () {
run();
});
}
window.addEventListener('DOMContentLoaded', function () {
run();
});
</script>
</body>
</html>

View File

@ -1,20 +0,0 @@
window.onload = function() {
//<editor-fold desc="Changeable Configuration Block">
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
window.ui = SwaggerUIBundle({
url: "https://petstore.swagger.io/v2/swagger.json",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
});
//</editor-fold>
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -42,13 +42,12 @@ DemodAnalyzerSettings:
DemodAnalyzerActions:
description: "Demod Analyzer actions"
required:
- deviceId
- channelId
properties:
deviceId:
type: integer
required: true
description: "Device Id/Number that channel belongs to"
channelId:
type: integer
required: true
description: "Channel Id/Number of the channel within the device"

View File

@ -59,13 +59,12 @@ MorseDecoderSettings:
MorseDecoderActions:
description: "Morse Decoder actions"
required:
- deviceId
- channelId
properties:
deviceId:
type: integer
required: true
description: "Device Id/Number that channel belongs to"
channelId:
type: integer
required: true
description: "Channel Id/Number of the channel within the device"

View File

@ -19,10 +19,10 @@ RemoteOutputSettings:
dataPort:
type: integer
deviceIndex:
description: remote SDRangel instance deviceset index
device: remote SDRangel instance deviceset index
type: integer
channelIndex:
description: remote SDRangel instance channel index
device: remote SDRangel instance channel index
type: integer
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)

View File

@ -76,7 +76,7 @@ WDSPRxSettings:
nbLeadTime:
type: number
format: float
description: Advance time (s)
descriuption: Advance time (s)
nbLagTime:
type: number
format: float

View File

@ -2973,6 +2973,7 @@ definitions:
FeatureSet:
description: "Grouping of features"
required:
- index
- featurecount
properties:
featurecount:
@ -3017,6 +3018,7 @@ definitions:
required:
- index
- hwType
- streamIndex
- sequence
- serial
- centerFrequency
@ -3420,6 +3422,7 @@ definitions:
description: "Group of configuration"
required:
- groupName
- nbPresets
properties:
groupName:
description: "Name of the configuration group"
@ -3527,3 +3530,4 @@ responses:
description: Function not implemented
schema:
$ref: "#/definitions/ErrorResponse"

View File

@ -22,18 +22,6 @@ services:
networks:
default:
ipv4_address: 172.20.0.3
swaggerclient:
image: "jeanberu/swagger-cli"
user: "1000:1000"
entrypoint: "/bin/sh"
container_name: "sdrangel_swaggerclient"
volumes:
- "${SDRANGEL_BASE}:/opt/build/sdrangel:rw"
stdin_open: true
tty: true
networks:
default:
ipv4_address: 172.20.0.4
networks:
default:
driver: bridge

View File

@ -41,14 +41,8 @@ Use `run.sh` to create or delete the Docker compose stack. It takes the followin
- `-b`: SDRangel source code root path (default `/opt/build/sdrangel`)
- `-c`: Compose stack name (default `sdrangelswg`)
The stack is composed of three containers sharing the `172.20.0.0/16` network internally.
The stack is composed of two containers sharing the `172.20.0.0/16` network internally.
- `sdrangel_swgserver`: The http server that listens on port `8081` serving files in `/opt/build/sdrangel/swagger/sdrangel`
- `sdrangel_swgcodegen`: The container with the Swagger code generator. The working directory is `/opt/build/sdrangel/swagger/sdrangel`
- `sdrangel_swaggerclient`: based on the `jeanberu/swagger-cli` image it can be used to validate the swagger schema (see next).
- `sdrangel_swgcodegen`: The container with the Swagger code generator. The working directory is `/opt/build/sdrangel/swagger/sdrangel`.
Use `login.sh` to start a shell in the `sdrangel_swgcodegen` container. At the prompt run `generate.sh` to generate the code from the Swagger definition files.
To validate the swagger schema:
- Enter the `sdrangel_swaggerclient` container with: `docker exec -it sdrangel_swaggerclient /bin/sh`
- Validate the schema with the command: `swagger-cli validate /opt/build/sdrangel/swagger/sdrangel/api/swagger/swagger.yaml`
- Correct errors from the most inner ones (maximum tabs). Top level errors usually result from low level errors and are therefore quite cryptic.

View File

@ -42,13 +42,12 @@ DemodAnalyzerSettings:
DemodAnalyzerActions:
description: "Demod Analyzer actions"
required:
- deviceId
- channelId
properties:
deviceId:
type: integer
required: true
description: "Device Id/Number that channel belongs to"
channelId:
type: integer
required: true
description: "Channel Id/Number of the channel within the device"

View File

@ -59,13 +59,12 @@ MorseDecoderSettings:
MorseDecoderActions:
description: "Morse Decoder actions"
required:
- deviceId
- channelId
properties:
deviceId:
type: integer
required: true
description: "Device Id/Number that channel belongs to"
channelId:
type: integer
required: true
description: "Channel Id/Number of the channel within the device"

View File

@ -19,10 +19,10 @@ RemoteOutputSettings:
dataPort:
type: integer
deviceIndex:
description: remote SDRangel instance deviceset index
device: remote SDRangel instance deviceset index
type: integer
channelIndex:
description: remote SDRangel instance channel index
device: remote SDRangel instance channel index
type: integer
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)

View File

@ -76,7 +76,7 @@ WDSPRxSettings:
nbLeadTime:
type: number
format: float
description: Advance time (s)
descriuption: Advance time (s)
nbLagTime:
type: number
format: float

View File

@ -2973,6 +2973,7 @@ definitions:
FeatureSet:
description: "Grouping of features"
required:
- index
- featurecount
properties:
featurecount:
@ -3017,6 +3018,7 @@ definitions:
required:
- index
- hwType
- streamIndex
- sequence
- serial
- centerFrequency
@ -3420,6 +3422,7 @@ definitions:
description: "Group of configuration"
required:
- groupName
- nbPresets
properties:
groupName:
description: "Name of the configuration group"
@ -3527,3 +3530,4 @@ responses:
description: Function not implemented
schema:
$ref: "#/definitions/ErrorResponse"

View File

@ -5530,7 +5530,6 @@ margin-bottom: 20px;
"description" : "List of DV serial devices available in the system"
};
defs.DemodAnalyzerActions = {
"required" : [ "channelId", "deviceId" ],
"properties" : {
"deviceId" : {
"type" : "integer",
@ -10588,7 +10587,6 @@ margin-bottom: 20px;
"description" : "MetisMISOSettings"
};
defs.MorseDecoderActions = {
"required" : [ "channelId", "deviceId" ],
"properties" : {
"deviceId" : {
"type" : "integer",
@ -13259,12 +13257,10 @@ margin-bottom: 20px;
"type" : "integer"
},
"deviceIndex" : {
"type" : "integer",
"description" : "remote SDRangel instance deviceset index"
"type" : "integer"
},
"channelIndex" : {
"type" : "integer",
"description" : "remote SDRangel instance channel index"
"type" : "integer"
},
"useReverseAPI" : {
"type" : "integer",
@ -17234,8 +17230,7 @@ margin-bottom: 20px;
},
"nbLeadTime" : {
"type" : "number",
"format" : "float",
"description" : "Advance time (s)"
"format" : "float"
},
"nbLagTime" : {
"type" : "number",
@ -59477,7 +59472,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2025-05-29T12:27:25.321+02:00
Generated 2025-05-03T17:59:40.379+02:00
</div>
</div>
</div>