Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: headless command for geo -- map (#8403)
* feat: headless command for geo * feat: add headless support for update map * fix: lgtm alert * test: add unit tests for geo headless validator * fix: duplicate import * fix: refactor methods and add check for exisitence * fix: move existence check * test: restructure unit tests
- Loading branch information
1 parent
11e4ae7
commit 73793b4
Showing
17 changed files
with
479 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
packages/amplify-headless-interface/schemas/geo/1/AddGeoRequest.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"description": "Defines the json object expected by `amplify add geo --headless` with map service", | ||
"type": "object", | ||
"properties": { | ||
"version": { | ||
"description": "The schema version.", | ||
"type": "number", | ||
"enum": [ | ||
1 | ||
] | ||
}, | ||
"serviceConfiguration": { | ||
"description": "The service configuration that will be interpreted by Amplify.", | ||
"oneOf": [ | ||
{"$ref": "#/definitions/MapServiceConfiguration"} | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"serviceConfiguration", | ||
"version" | ||
], | ||
"definitions": { | ||
"MapServiceConfiguration": { | ||
"description": "Configuration exposed by Map.", | ||
"type": "object", | ||
"properties": { | ||
"serviceName": { | ||
"description": "The service name of the resource provider.", | ||
"type": "string", | ||
"enum": [ | ||
"Map" | ||
] | ||
}, | ||
"name": { | ||
"description": "The name of the map that will be created.", | ||
"type": "string" | ||
}, | ||
"mapStyle": { | ||
"description": "The map style type.", | ||
"type": "string", | ||
"enum": [ | ||
"VectorEsriNavigation", | ||
"VectorEsriStreets", | ||
"VectorEsriTopographic", | ||
"VectorEsriDarkGrayCanvas", | ||
"VectorEsriLightGrayCanvas", | ||
"VectorHereBerlin" | ||
] | ||
}, | ||
"pricingPlan": { | ||
"$ref": "#/definitions/PricingPlan" | ||
}, | ||
"accessType": { | ||
"$ref": "#/definitions/AccessType" | ||
}, | ||
"setAsDefault": { | ||
"$ref": "#/definitions/SetAsDefault" | ||
} | ||
}, | ||
"required": [ | ||
"serviceName", | ||
"name", | ||
"mapStyle", | ||
"accessType", | ||
"pricingPlan", | ||
"setAsDefault" | ||
] | ||
}, | ||
"PricingPlan": { | ||
"description": "The pricing plan for amazon location service.", | ||
"type": "string", | ||
"enum": [ | ||
"RequestBasedUsage", | ||
"MobileAssetTracking", | ||
"MobileAssetManagement" | ||
] | ||
}, | ||
"AccessType": { | ||
"description": "The access policy for geo resources.", | ||
"type": "string", | ||
"enum": [ | ||
"AuthorizedUsers", | ||
"AuthorizedAndGuestUsers" | ||
] | ||
}, | ||
"SetAsDefault": { | ||
"description": "Whether the geo resource added is set to default.", | ||
"type": "boolean" | ||
} | ||
}, | ||
"$schema": "http://json-schema.org/draft-07/schema#" | ||
} |
66 changes: 66 additions & 0 deletions
66
packages/amplify-headless-interface/schemas/geo/1/UpdateGeoRequest.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"version": { | ||
"description": "The schema version.", | ||
"type": "number", | ||
"enum": [ | ||
1 | ||
] | ||
}, | ||
"serviceModification": { | ||
"description": "Service modifications that will be interpreted by Amplify.", | ||
"oneOf": [ | ||
{"$ref": "#/definitions/MapModification"} | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"serviceModification", | ||
"version" | ||
], | ||
"definitions": { | ||
"MapModification": { | ||
"description": "Modification exposed by Map.", | ||
"type": "object", | ||
"properties": { | ||
"serviceName": { | ||
"description": "The service name of the resource provider.", | ||
"type": "string", | ||
"enum": [ | ||
"Map" | ||
] | ||
}, | ||
"name": { | ||
"description": "The name of the map that will be modified.", | ||
"type": "string" | ||
}, | ||
"accessType": { | ||
"$ref": "#/definitions/AccessType" | ||
}, | ||
"setAsDefault": { | ||
"$ref": "#/definitions/SetAsDefault" | ||
} | ||
}, | ||
"required": [ | ||
"serviceName", | ||
"name", | ||
"accessType", | ||
"setAsDefault" | ||
] | ||
}, | ||
"AccessType": { | ||
"description": "The access policy for geo resources.", | ||
"type": "string", | ||
"enum": [ | ||
"AuthorizedUsers", | ||
"AuthorizedAndGuestUsers" | ||
] | ||
}, | ||
"SetAsDefault": { | ||
"description": "Whether the geo resource added is set to default.", | ||
"type": "boolean" | ||
} | ||
}, | ||
"$schema": "http://json-schema.org/draft-07/schema#" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.