diff --git a/webassets/apidocs/openapi.yml b/webassets/apidocs/openapi.yml index bedca5b..27ca128 100644 --- a/webassets/apidocs/openapi.yml +++ b/webassets/apidocs/openapi.yml @@ -55,46 +55,13 @@ paths: description: "Limit the spots to only ones from one or more sources. To select more than one source, supply a comma-separated list." required: false schema: - type: string - enum: - - POTA - - SOTA - - WWFF - - WWBOTA - - GMA - - HEMA - - ParksNPeaks - - ZLOTA - - WOTA - - BOTA - - Cluster - - RBN - - APRS-IS - - UKPacketNet + $ref: "#/components/schemas/Source" - name: sig in: query description: "Limit the spots to only ones from one or more Special Interest Groups provided as an argument. To select more than one SIG, supply a comma-separated list." required: false schema: - type: string - enum: - - POTA - - SOTA - - WWFF - - WWBOTA - - GMA - - HEMA - - WCA - - MOTA - - SIOTA - - ARLHS - - ILLW - - ZLOTA - - IOTA - - WOTA - - BOTA - - WAB - - WAI + $ref: "#/components/schemas/SIGName" - name: needs_sig in: query description: "Limit the spots to only ones with a Special Interest Group such as POTA. Because supplying all known SIGs as a `sigs` parameter is unwieldy, and leaving `sigs` blank will also return spots with *no* SIG, this parameter can be set true to return only spots with a SIG, regardless of what it is, so long as it's not blank. This is what Field Spotter uses to exclude generic cluster spots and only retrieve xOTA things." @@ -114,96 +81,31 @@ paths: description: "Limit the spots to only ones from one or more bands. To select more than one band, supply a comma-separated list." required: false schema: - type: string - enum: - - 160m - - 80m - - 60m - - 40m - - 30m - - 20m - - 17m - - 15m - - 12m - - 10m - - 6m - - 4m - - 2m - - 70cm - - 23cm - - 13cm + $ref: "#/components/schemas/BandName" - name: mode in: query description: "Limit the spots to only ones from one or more modes. To select more than one mode, supply a comma-separated list." required: false schema: - type: string - enum: - - CW - - PHONE - - SSB - - USB - - LSB - - AM - - FM - - DV - - DMR - - DSTAR - - C4FM - - M17 - - DIGI - - DATA - - FT8 - - FT4 - - RTTY - - SSTV - - JS8 - - HELL - - BPSK - - PSK - - BPSK31 - - OLIVIA - - MFSK - - MFSK32 - - PKT + $ref: "#/components/schemas/Mode" - name: mode_type in: query description: "Limit the spots to only ones from one or more mode families. To select more than one mode family, supply a comma-separated list." required: false schema: - type: string - enum: - - CW - - PHONE - - DATA + $ref: "#/components/schemas/Mode" - name: dx_continent in: query description: "Limit the spots to only ones where the DX (the operator being spotted) is on the given continent(s). To select more than one continent, supply a comma-separated list." required: false schema: - type: string - enum: - - EU - - NA - - SA - - AS - - AF - - OC - - AN + $ref: "#/components/schemas/Continent" - name: de_continent in: query description: "Limit the spots to only ones where the spotteris on the given continent(s). To select more than one continent, supply a comma-separated list." required: false schema: - type: string - enum: - - EU - - NA - - SA - - AS - - AF - - OC - - AN + $ref: "#/components/schemas/Continent" - name: dedupe in: query description: "\"De-duplicate\" the spots, returning only the latest spot for any given callsign." @@ -285,60 +187,19 @@ paths: description: "Limit the alerts to only ones from one or more sources. To select more than one source, supply a comma-separated list." required: false schema: - type: string - enum: - - POTA - - SOTA - - WWFF - - WWBOTA - - GMA - - HEMA - - ParksNPeaks - - ZLOTA - - WOTA - - BOTA - - Cluster - - RBN - - APRS-IS - - UKPacketNet + $ref: "#/components/schemas/Source" - name: sig in: query description: "Limit the alerts to only ones from one or more Special Interest Groups. To select more than one SIG, supply a comma-separated list." required: false schema: - type: string - enum: - - POTA - - SOTA - - WWFF - - WWBOTA - - GMA - - HEMA - - WCA - - MOTA - - SIOTA - - ARLHS - - ILLW - - ZLOTA - - IOTA - - WOTA - - BOTA - - WAB - - WAI + $ref: "#/components/schemas/SIGName" - name: dx_continent in: query description: "Limit the alerts to only ones where the DX operator is on the given continent(s). To select more than one continent, supply a comma-separated list." required: false schema: - type: string - enum: - - EU - - NA - - SA - - AS - - AF - - OC - - AN + $ref: "#/components/schemas/Continent" - name: dx_call_includes in: query description: "Limit the alerts to only ones where the DX callsign includes the supplied string (case-insensitive). Generally a complete callsign, but you can supply a shorter string for partial matches." @@ -568,17 +429,8 @@ paths: description: Country flag of the operator. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc. example: "" continent: - type: string description: Continent of the operator - enum: - - EU - - NA - - SA - - AS - - AF - - OC - - AN - example: EU + $ref: "#/components/schemas/Continent" dxcc_id: type: integer description: DXCC ID of the operator @@ -604,13 +456,8 @@ paths: description: Longitude of the opertor's QTH, in degrees. This could be from an online lookup service, or just based on the DXCC. example: -1.2345 location_source: - type: string description: Where we got the location (grid/latitude/longitude) from. Unlike a spot where we might have a summit position or WAB square, here the only options are an online QTH lookup, or a location based purely on DXCC, or nothing. - enum: - - "HOME QTH" - - DXCC - - NONE - example: "HOME QTH" + $ref: "#/components/schemas/LocationSourceForAlert" '422': description: Validation error e.g. callsign missing or format incorrect content: @@ -632,26 +479,7 @@ paths: in: query description: Special Interest Group (SIG), e.g. outdoor activity programme such as POTA required: true - type: string - enum: - - POTA - - SOTA - - WWFF - - WWBOTA - - GMA - - HEMA - - WCA - - MOTA - - SIOTA - - ARLHS - - ILLW - - ZLOTA - - IOTA - - WOTA - - BOTA - - WAB - - WAI - example: POTA + $ref: "#/components/schemas/SIGName" - name: id in: query description: ID of a reference in that SIG @@ -721,6 +549,158 @@ paths: components: schemas: + Source: + type: string + enum: + - POTA + - SOTA + - WWFF + - WWBOTA + - GMA + - HEMA + - ParksNPeaks + - ZLOTA + - WOTA + - Cluster + - RBN + - APRS-IS + - UKPacketNet + example: POTA + + SIGName: + type: string + enum: + - POTA + - SOTA + - WWFF + - WWBOTA + - GMA + - HEMA + - WCA + - MOTA + - SIOTA + - ARLHS + - ILLW + - ZLOTA + - KRMNPA + - IOTA + - WOTA + - BOTA + - WAB + - WAI + example: POTA + + Continent: + type: string + enum: + - EU + - NA + - SA + - AS + - AF + - OC + - AN + example: EU + + BandName: + type: string + enum: + - 2200m + - 600m + - 160m + - 80m + - 60m + - 40m + - 30m + - 20m + - 17m + - 15m + - 12m + - 11m + - 10m + - 6m + - 5m + - 4m + - 2m + - 1.25m + - 70cm + - 23cm + - 2.4GHz + - 5.8GHz + - 10GHz + - 24GHz + - 47GHz + - 76GHz + example: 40m + + Mode: + type: string + enum: + - CW + - PHONE + - SSB + - USB + - LSB + - AM + - FM + - DV + - DMR + - DSTAR + - C4FM + - M17 + - DIGI + - DATA + - FT8 + - FT4 + - RTTY + - SSTV + - JS8 + - HELL + - BPSK + - PSK + - BPSK31 + - OLIVIA + - MFSK + - MFSK32 + - PKT + example: SSB + + ModeType: + type: string + enum: + - CW + - PHONE + - DATA + example: CW + + ModeSource: + type: string + enum: + - SPOT + - COMMENT + - BANDPLAN + - NONE + example: SPOT + + LocationSourceForSpot: + type: string + enum: + - SPOT + - "SIG REF LOOKUP" + - "WAB/WAI GRID" + - "HOME QTH" + - DXCC + - NONE + example: SPOT + + LocationSourceForAlert: + type: string + enum: + - "HOME QTH" + - DXCC + - NONE + example: "HOME QTH" + SIGRef: type: object properties: @@ -729,27 +709,8 @@ components: description: SIG reference ID. example: GB-0001 sig: - type: string description: SIG that this reference is in. - enum: - - POTA - - SOTA - - WWFF - - WWBOTA - - GMA - - HEMA - - WCA - - MOTA - - SIOTA - - ARLHS - - ILLW - - ZLOTA - - IOTA - - WOTA - - BOTA - - WAB - - WAI - example: POTA + $ref: "#/components/schemas/SIGName" name: type: string description: SIG reference name @@ -799,17 +760,8 @@ components: description: Country flag of the DX operator. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc. example: "" dx_continent: - type: string description: Continent of the DX operator - enum: - - EU - - NA - - SA - - AS - - AF - - OC - - AN - example: EU + $ref: "#/components/schemas/Continent" dx_dxcc_id: type: integer description: DXCC ID of the DX operator @@ -839,16 +791,8 @@ components: description: Longitude of the DX spot, in degrees. This could be from a geographical reference e.g. POTA, or from a QRZ lookup example: -1.2345 dx_location_source: - type: string description: Where we got the DX location (grid/latitude/longitude) from. If this was from the spot itself, or from a lookup of the SIG ref (e.g. park) it's likely quite accurate, but if we had to fall back to QRZ lookup, or even a location based on the DXCC itself, it will be a lot less accurate. - enum: - - SPOT - - "SIG REF LOOKUP" - - "WAB/WAI GRID" - - "HOME QTH" - - DXCC - - NONE - example: SPOT + $ref: "#/components/schemas/LocationSourceForSpot" dx_location_good: type: boolean description: Does the software think the location is good enough to put a marker on a map? This is true if the source is "SPOT", "SIG REF LOOKUP" or "WAB/WAI GRID", or alternatively if the source is "HOME QTH" and the callsign doesn't have a slash in it (i.e. operator likely at home). @@ -866,17 +810,8 @@ components: description: Country flag of the spotter. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc. example: "" de_continent: - type: string - enum: - - EU - - NA - - SA - - AS - - AF - - OC - - AN description: Continent of the spotter - example: EU + $ref: "#/components/schemas/Continent" de_dxcc_id: type: integer description: DXCC ID of the spotter @@ -898,79 +833,22 @@ components: description: Longitude of the DX spotspotter, in degrees. This is not going to be from a xOTA reference so it will likely just be a QRZ or DXCC lookup. If the spotter is also portable, this is probably wrong, but it's good enough for some simple mapping. example: -1.2345 mode: - type: string description: Reported mode. - enum: - - CW - - PHONE - - SSB - - USB - - LSB - - AM - - FM - - DV - - DMR - - DSTAR - - C4FM - - M17 - - DIGI - - DATA - - FT8 - - FT4 - - RTTY - - SSTV - - JS8 - - HELL - - BPSK - - PSK - - BPSK31 - - OLIVIA - - MFSK - - MFSK32 - - PKT + $ref: "#/components/schemas/Mode" example: SSB mode_type: - type: string description: Inferred mode "family". - enum: - - CW - - PHONE - - DATA - example: PHONE + $ref: "#/components/schemas/ModeType" mode_source: - type: string description: Where we got the mode from. If this was from the spot itself, it's likely quite accurate, but if we had to fall back to the bandplan, it might not be correct. - enum: - - SPOT - - COMMENT - - BANDPLAN - - NONE + $ref: "#/components/schemas/ModeSource" freq: type: number description: Frequency, in Hz example: 7150500 band: - type: string description: Band, defined by the frequency. - enum: - - 160m - - 80m - - 60m - - 40m - - 30m - - 20m - - 17m - - 15m - - 12m - - 10m - - 6m - - 4m - - 2m - - 70cm - - 23cm - - 13cm - - Unknown - example: 40m + $ref: "#/components/schemas/BandName" time: type: number description: Time of the spot, UTC seconds since UNIX epoch @@ -992,27 +870,8 @@ components: description: Comment left by the spotter, if any example: "59 in NY 73" sig: - type: string description: Special Interest Group (SIG), e.g. outdoor activity programme such as POTA - enum: - - POTA - - SOTA - - WWFF - - WWBOTA - - GMA - - HEMA - - WCA - - MOTA - - SIOTA - - ARLHS - - ILLW - - ZLOTA - - IOTA - - WOTA - - BOTA - - WAB - - WAI - example: POTA + $ref: "#/components/schemas/SIGName" sig_refs: type: array items: @@ -1029,7 +888,7 @@ components: band_color: type: string descripton: Colour to represent this spot, if a client chooses to colour spots based on their frequency band, using PSK Reporter's default colours. HTML colour e.g. hex. - example: #ff0000" + example: "#ff0000" band_contrast_color: type: string descripton: Black or white, whichever best contrasts with "band_color". @@ -1039,23 +898,8 @@ components: description: QRT state. Some APIs return spots marked as QRT. Otherwise we can check the comments. example: false source: - type: string description: Where we got the spot from. - enum: - - POTA - - SOTA - - WWFF - - WWBOTA - - GMA - - HEMA - - ParksNPeaks - - ZLOTA - - WOTA - - Cluster - - RBN - - APRS-IS - - UKPacketNet - example: POTA + $ref: "#/components/schemas/Source" source_id: type: string description: The ID the source gave it, if any. @@ -1090,17 +934,8 @@ components: description: Country flag of the DX operator. This is limited to the range of emoji flags. For some DXCCs there may not be an official emoji flag, e.g. Northern Ireland, so the appearance may vary depending on your browser and operating system. Some small islands may also have no flag. Many DXCCs may also share a flag, e.g. mainland Spain, Balearic Islands, etc. example: "" dx_continent: - type: string description: Continent of the DX operator - enum: - - EU - - NA - - SA - - AS - - AF - - OC - - AN - example: EU + $ref: "#/components/schemas/Continent" dx_dxcc_id: type: integer description: DXCC ID of the DX operator @@ -1146,27 +981,8 @@ components: description: Comment made by the activator, if any example: "2025 DXpedition to null island" sig: - type: string description: Special Interest Group (SIG), e.g. outdoor activity programme such as POTA - enum: - - POTA - - SOTA - - WWFF - - WWBOTA - - GMA - - HEMA - - WCA - - MOTA - - SIOTA - - ARLHS - - ILLW - - ZLOTA - - IOTA - - WOTA - - BOTA - - WAB - - WAI - example: POTA + $ref: "#/components/schemas/SIGName" sig_refs: type: array items: @@ -1183,22 +999,7 @@ components: source: type: string description: Where we got the alert from. - enum: - - POTA - - SOTA - - WWFF - - WWBOTA - - GMA - - HEMA - - ParksNPeaks - - ZLOTA - - WOTA - - BOTA - - Cluster - - RBN - - APRS-IS - - UKPacketNet - example: POTA + $ref: "#/components/schemas/Source" source_id: type: string description: The ID the source gave it, if any. @@ -1208,9 +1009,8 @@ components: type: object properties: name: - type: string description: The name of the provider. - example: POTA + $ref: "#/components/schemas/Source" enabled: type: boolean description: Whether the provider is enabled or not. @@ -1232,9 +1032,8 @@ components: type: object properties: name: - type: string description: The name of the provider. - example: POTA + $ref: "#/components/schemas/Source" enabled: type: boolean description: Whether the provider is enabled or not. @@ -1252,9 +1051,8 @@ components: type: object properties: name: - type: string description: The name of the band - example: 40m + $ref: "#/components/schemas/BandName" start_freq: type: int description: The start frequency of this band, in Hz. @@ -1276,9 +1074,8 @@ components: type: object properties: name: - type: string description: The abbreviated name of the SIG - example: POTA + $ref: "#/components/schemas/SIGName" description: type: string description: The full name of the SIG