Closed chinaunicomyangfan closed 3 months ago
Hello @chinaunicomyangfan
For your consideration Probably we should align the area model with the one used in Device location to provide consistency btw our API. Look for example in location-retrieval.yaml where we have following model:
Area:
type: object
properties:
areaType:
$ref: "#/components/schemas/AreaType"
required:
- areaType
discriminator:
propertyName: areaType
mapping:
CIRCLE: "#/components/schemas/Circle"
POLYGON: "#/components/schemas/Polygon"
AreaType:
type: string
description: |
Type of this area.
CIRCLE - The area is defined as a circle.
POLYGON - The area is defined as a polygon.
enum:
- CIRCLE
- POLYGON
Circle:
description: Circular area
allOf:
- $ref: "#/components/schemas/Area"
- type: object
required:
- center
- radius
properties:
center:
$ref: "#/components/schemas/Point"
radius:
type: number
description: Distance from the center in meters
minimum: 1
Polygon:
allOf:
- $ref: "#/components/schemas/Area"
- type: object
required:
- boundary
properties:
boundary:
$ref: "#/components/schemas/PointList"
PointList:
type: array
items:
$ref: "#/components/schemas/Point"
minItems: 3
maxItems: 15
Point:
type: object
description: Coordinates (latitude, longitude) defining a location in a map
required:
- latitude
- longitude
properties:
latitude:
$ref: "#/components/schemas/Latitude"
longitude:
$ref: "#/components/schemas/Longitude"
example:
latitude: 50.735851
longitude: 7.10066
Latitude:
description: Latitude component of a location
type: number
format: double
minimum: -90
maximum: 90
Longitude:
description: Longitude component of location
type: number
format: double
minimum: -180
maximum: 180
It absolutely not change our API function but provided consistency between CAMARA API.
@bigludo7 Thanks! I will modify the yaml file to maintain consistency
Hello @chinaunicomyangfan
For your consideration Probably we should align the area model with the one used in Device location to provide consistency btw our API. Look for example in location-retrieval.yaml where we have following model:
Area: type: object properties: areaType: $ref: "#/components/schemas/AreaType" required: - areaType discriminator: propertyName: areaType mapping: CIRCLE: "#/components/schemas/Circle" POLYGON: "#/components/schemas/Polygon" AreaType: type: string description: | Type of this area. CIRCLE - The area is defined as a circle. POLYGON - The area is defined as a polygon. enum: - CIRCLE - POLYGON Circle: description: Circular area allOf: - $ref: "#/components/schemas/Area" - type: object required: - center - radius properties: center: $ref: "#/components/schemas/Point" radius: type: number description: Distance from the center in meters minimum: 1 Polygon: allOf: - $ref: "#/components/schemas/Area" - type: object required: - boundary properties: boundary: $ref: "#/components/schemas/PointList" PointList: type: array items: $ref: "#/components/schemas/Point" minItems: 3 maxItems: 15 Point: type: object description: Coordinates (latitude, longitude) defining a location in a map required: - latitude - longitude properties: latitude: $ref: "#/components/schemas/Latitude" longitude: $ref: "#/components/schemas/Longitude" example: latitude: 50.735851 longitude: 7.10066 Latitude: description: Latitude component of a location type: number format: double minimum: -90 maximum: 90 Longitude: description: Longitude component of location type: number format: double minimum: -180 maximum: 180
It absolutely not change our API function but provided consistency between CAMARA API.
That's pretty helpful. 👍 @bigludo7 I think we should also refer this in Network Slice Booking API yaml.
The parameter area has been modified.PR is here
Problem description add Initial yaml version for RegionUserCount
Expected action discuss and give opinion
https://github.com/camaraproject/RegionUserCount/pull/5