Skip to content

Commit 1069fa9

Browse files
daniel-rochaDaniel Rocha
authored andcommitted
Azure Maps - fix readme settings (Azure#18016)
* Added content to support the new Render codegen settings * Changed license settings * Added settings for Route code generation * Added Search codegen settings * Modified codegen settings for Render * Modified x-ms-client-name to boundingBoxPrivate * Fixed model validation errors pointed out by OAV * Ran prettier to fix pipeline errors Co-authored-by: Daniel Rocha <[email protected]>
1 parent 9378e13 commit 1069fa9

File tree

11 files changed

+159
-12
lines changed

11 files changed

+159
-12
lines changed

specification/maps/data-plane/Render/preview/2.1/examples/SuccessfulAttributionRequest.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
"api-version": "2.1",
44
"tilesetId": "microsoft.base",
55
"zoom": 6,
6-
"bounds": "-122.414162,47.579490,-122.247157,47.668372"
6+
"bounds": [
7+
-122.414162,
8+
47.579490,
9+
-122.247157,
10+
47.668372
11+
]
712
},
813
"responses": {
914
"200": {

specification/maps/data-plane/Render/preview/2.1/examples/SuccessfulBoundingBoxCopyrightRequest.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
"parameters": {
33
"api-version": "1.0",
44
"format": "json",
5-
"mincoordinates": "52.41064,4.84228",
6-
"maxcoordinates": "52.41072,4.84239",
5+
"mincoordinates": [
6+
52.41064,
7+
4.84228
8+
],
9+
"maxcoordinates": [
10+
52.41072,
11+
4.84239
12+
],
713
"text": "yes"
814
},
915
"responses": {

specification/maps/data-plane/Render/preview/2.1/examples/SuccessfulStaticImageRequest.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
"api-version": "1.0",
44
"format": "png",
55
"zoom": 2,
6-
"bbox": "1.355233,42.982261,24.980233,56.526017",
6+
"bbox": [
7+
1.355233,
8+
42.982261,
9+
24.980233,
10+
56.526017
11+
],
712
"layer": "basic",
813
"style": "main"
914
},

specification/maps/data-plane/Render/preview/2.1/examples/SuccessfulTileRequest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"headers": {
1212
"Content-Type": "application/vnd.mapbox-vector-tile"
1313
},
14-
"body": "{file}"
14+
"body": "binary image string"
1515
}
1616
}
1717
}

specification/maps/data-plane/Render/preview/2.1/render.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@
119119
"200": {
120120
"description": "The tile returned from a successful API call.",
121121
"schema": {
122-
"$ref": "../2.0/render.json#/definitions/MapTile"
122+
"type": "object",
123+
"format": "file",
124+
"readOnly": true
123125
},
124126
"headers": {
125127
"Content-Type": {
@@ -268,7 +270,9 @@
268270
"200": {
269271
"description": "This tile is returned from a successful Get Map State Tile call",
270272
"schema": {
271-
"$ref": "../2.0/render.json#/definitions/MapTile"
273+
"type": "object",
274+
"format": "file",
275+
"readOnly": true
272276
},
273277
"headers": {
274278
"Content-Type": {
@@ -410,7 +414,7 @@
410414
},
411415
{
412416
"name": "bbox",
413-
"x-ms-client-name": "boundingBox",
417+
"x-ms-client-name": "boundingBoxPrivate",
414418
"in": "query",
415419
"description": "Bounding box. Projection used - EPSG:3857. Format : 'minLon, minLat,\nmaxLon, maxLat'. \n\nNote: Either bbox or center are required\nparameters. They are mutually exclusive. It shouldn’t be used with\nheight or width.\n\nThe maximum allowed ranges for Lat and Lon are defined for each zoom level\nin the table at the top of this page.",
416420
"type": "array",
Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,36 @@
11
## Java
22

33
``` yaml $(java)
4+
directive:
5+
- rename-model:
6+
from: MapTileset
7+
to: MapTilesetPrivate
8+
- from: swagger-document
9+
where: '$.parameters["BoundingBoxSouthWest"]'
10+
transform: >
11+
$["x-ms-parameter-grouping"]["name"] = "BoundingBoxPrivate";
12+
- from: swagger-document
13+
where: '$.parameters["BoundingBoxNorthEast"]'
14+
transform: >
15+
$["x-ms-parameter-grouping"]["name"] = "BoundingBoxPrivate";
16+
- from: swagger-document
17+
where: '$.parameters["bbox"]'
18+
transform: >
19+
$["x-ms-client-name"] = "BoundingBoxPrivate";
20+
421
java:
522
namespace: com.azure.maps.render
6-
license-header: MICROSOFT_MIT_NO_CODEGEN
23+
license-header: MICROSOFT_MIT_SMALL
724
payload-flattening-threshold: 0
825
output-folder: $(azure-libraries-for-java-folder)/azure-maps-render
26+
add-context-parameter: true
27+
context-client-method-parameter: true
28+
client-logger: true
29+
generate-client-as-impl: true
30+
sync-methods: all
31+
generate-sync-async-clients: false
32+
polling: {}
33+
models-subpackage: implementation.models
34+
custom-types-subpackage: models
35+
custom-types: LocalizedMapView,MapImageStyle,RasterTileFormat,StaticMapLayer,MapTileSize,TileIndex,TilesetID,Copyright,CopyrightCaption,MapAttribution,RegionCopyrights,RegionCopyrightsCountry,ErrorAdditionalInfo,ErrorDetail,ErrorResponse,ErrorResponseException
936
```

specification/maps/data-plane/Render/readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ tag: 2.1-preview
3232
add-credentials: true
3333
credential-default-policy-type: BearerTokenCredentialPolicy
3434
credential-scopes: https://atlas.microsoft.com/.default
35+
track2: true
36+
verbose: true
37+
sdk-integration: true
38+
modelerfour:
39+
additional-checks: false
40+
lenient-model-deduplication: true
3541
```
3642
3743
### Tag: 2.1-preview
Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
11
## Java
22

33
``` yaml $(java)
4+
5+
directive:
6+
- rename-model:
7+
from: RouteMatrix
8+
to: RouteMatrixPrivate
9+
- rename-model:
10+
from: RouteMatrixResult
11+
to: RouteMatrixResultPrivate
12+
- rename-model:
13+
from: RouteMatrixQuery
14+
to: RouteMatrixQueryPrivate
415
java:
516
namespace: com.azure.maps.route
617
license-header: MICROSOFT_MIT_NO_CODEGEN
718
payload-flattening-threshold: 0
8-
output-folder: $(azure-libraries-for-java-folder)/azure-maps-route
19+
output-folder: $(azure-libraries-for-java-folder)/azure-maps-route
20+
add-context-parameter: true
21+
context-client-method-parameter: true
22+
client-logger: true
23+
generate-client-as-impl: true
24+
sync-methods: all
25+
generate-sync-async-clients: false
26+
polling: {}
27+
models-subpackage: implementation.models
28+
custom-types-subpackage: models
29+
custom-types: AlternativeRouteType,BatchResultSummary,ComputeTravelTime,DelayMagnitude,DrivingSide,EffectiveSetting,ErrorAdditionalInfo,ErrorDetail,ErrorResponse,ErrorResponseException,GuidanceInstructionType,GuidanceManeuver,InclineLevel,JunctionType,Report,ResponseSectionType,ResponseTravelMode,Route,RouteAvoidType,RouteDirections,RouteDirectionsBatchResult,RouteGuidance,RouteInstructionGroup,RouteInstructionsType,RouteLegSummary,RouteMatrixSummary,RouteOptimizedWaypoint,RouteRangeResult,RouteReport,RouteRepresentationForBestOrder,RouteSection,RouteSectionTec,RouteSectionTecCause,RouteSummary,RouteType,SectionType,SimpleCategory,TravelMode,VehicleEngineType,VehicleLoadType,WindingnessLevel
930
```

specification/maps/data-plane/Route/readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ tag: 1.0-preview
3232
add-credentials: true
3333
credential-default-policy-type: BearerTokenCredentialPolicy
3434
credential-scopes: https://atlas.microsoft.com/.default
35+
track2: true
36+
verbose: true
37+
sdk-integration: true
38+
modelerfour:
39+
additional-checks: false
40+
lenient-model-deduplication: true
3541
```
3642
3743
Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,70 @@
11
## Java
22

33
``` yaml $(java)
4+
5+
directive:
6+
- rename-model:
7+
from: Address
8+
to: AddressPrivate
9+
- rename-model:
10+
from: AddressRanges
11+
to: AddressRangesPrivate
12+
- rename-model:
13+
from: SearchAddressResult
14+
to: SearchAddressResultPrivate
15+
- rename-model:
16+
from: SearchAddressResultItem
17+
to: SearchAddressResultItemPrivate
18+
- rename-model:
19+
from: ReverseSearchAddressResult
20+
to: ReverseSearchAddressResultPrivate
21+
- rename-model:
22+
from: ReverseSearchAddressResultItem
23+
to: ReverseSearchAddressResultItemPrivate
24+
- rename-model:
25+
from: ReverseSearchCrossStreetAddressResult
26+
to: ReverseSearchCrossStreetAddressResultPrivate
27+
- rename-model:
28+
from: ReverseSearchCrossStreetAddressResultItem
29+
to: ReverseSearchCrossStreetAddressResultItemPrivate
30+
- rename-model:
31+
from: EntryPoint
32+
to: EntryPointPrivate
33+
- rename-model:
34+
from: SearchSummary
35+
to: SearchSummaryPrivate
36+
- rename-model:
37+
from: SearchAddressBatchResult
38+
to: SearchAddressBatchResultPrivate
39+
- rename-model:
40+
from: SearchAddressBatchItem
41+
to: SearchAddressBatchItemPrivate
42+
- rename-model:
43+
from: ReverseSearchAddressBatchProcessResult
44+
to: ReverseSearchAddressBatchResultPrivate
45+
- rename-model:
46+
from: ReverseSearchAddressBatchItem
47+
to: ReverseSearchAddressBatchItemPrivate
48+
- rename-model:
49+
from: BoundingBox
50+
to: BoundingBoxPrivate
51+
- rename-model:
52+
from: Polygon
53+
to: PolygonPrivate
54+
455
java:
556
namespace: com.azure.maps.search
6-
license-header: MICROSOFT_MIT_NO_CODEGEN
57+
license-header: MICROSOFT_MIT_SMALL
758
payload-flattening-threshold: 0
8-
output-folder: $(azure-libraries-for-java-folder)/azure-maps-search
59+
output-folder: $(azure-libraries-for-java-folder)/azure-maps-search
60+
add-context-parameter: true
61+
context-client-method-parameter: true
62+
client-logger: true
63+
generate-client-as-impl: true
64+
sync-methods: all
65+
generate-sync-async-clients: false
66+
polling: {}
67+
models-subpackage: implementation.models
68+
custom-types-subpackage: models
69+
custom-types: BatchResultSummary,BrandName,Classification,ClassificationName,DataSource,ErrorAdditionalInfo,ErrorDetail,ErrorResponseException,ElectricVehicleConnector,EntryPointType,GeographicEntityType,GeometryIdentifier,LocalizedMapView,OperatingHoursTime,OperatingHoursRange,MatchType,OperatingHours,OperatingHoursTimeRange,PointOfInterest,PointOfInterestCategory,PointOfInterestCategorySet,PointOfInterestCategoryTreeResult,PointOfInterestExtendedPostalCodes,RoadUseType,SearchAddressResultType,SearchIndexes,ErrorResponse,QueryType
970
```

0 commit comments

Comments
 (0)