-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Typespec file for Easm api version 2023-03-01-preview (#24937)
* Add typespec file for easm * Change service version doc * Update file structure and add config file * Move examples under a version * Add a openapi.json file * Remove openapi.json file * Change operation names and empty object * Update tspconfig * Change config file to add .net and js emitter * Add service dir to config file * Update csharp config * Add projected name for csharp * Use original op * Update disco group list example * Remove observations endpoint * Remove observation models * Add java options * Use Azure.Core standard operation and use resource models * Reformat folder structure * Suppress warnings * Change metadata to record<unknown> * Add suppression for Record<unknown> * Update examples * Remove unused examples * Change apiversion to apiVersion * Reformat with prettier * Use foundations for list operation * Update examples and list operations * Remove unused minimum set * Update all uuid * Update Assets example * Run prettier on Assets_List * update oauth2 definition * remove implicitflow model * Update specification/riskiq/Easm/tspconfig.yaml Co-authored-by: Mike Harder <[email protected]> * Update models.tsp * Update routes.tsp * Remove typespec-apiview emitter * update examples, add client.tsp * run prettier * Run prettier on Easm examples * Update examples, main.tsp. Remove client.tsp * Add operation id to examples under typespec project * Add titles to examples * Reformat typespec files * Update DataConnection validate example * Update data connection validation example * Update the easm.json file based on tsv tool * Update swagger file and its examples * Update Easm typespec examples * Update uris in examples * Update cvss3 name * Update cvss3 model with tsp * Add totalElements to DiscoGroups, DiscoTemplates, and SavedFilters List traits * Run validation for the previous commit * Suppress linting rule of typespec generated swagger * Update namespace for dotnet and javascript to the approved namespace * Update package directory for java sdk from azure-defender-easm to azure-analytics-defender-easm * use AlexaDetails instead of AlexaInfo in java sdk * Fix git diff issue in Typespec Validation by running npx tsp * Remove unused paged result models, add @pagedResult, @nextlink, and @Items decorators to paged result models and their properties. Remove custom NoContentResult model and use Typespec.Http.NoContentResponse model instead * Add decorators to indicate the resource is createOrUpdate or just update --------- Co-authored-by: shadahmed-microsoft <[email protected]> Co-authored-by: Mike Harder <[email protected]> Co-authored-by: Shad <[email protected]>
- Loading branch information
Showing
62 changed files
with
12,881 additions
and
4,018 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
...23-03-01-preview/examples/Assets_Get.json → ...sets_GetAssetResource_MaximumSet_Gen.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
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
2 changes: 2 additions & 0 deletions
2
...03-01-preview/examples/Assets_Update.json → ...w/Assets_UpdateAssets_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...preview/examples/DataConnections_Put.json → ...ReplaceDataConnection_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...view/examples/DataConnections_Delete.json → ..._DeleteDataConnection_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...preview/examples/DataConnections_Get.json → ...ons_GetDataConnection_MaximumSet_Gen.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
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
2 changes: 2 additions & 0 deletions
2
...ew/examples/DataConnections_Validate.json → ...alidateDataConnection_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...preview/examples/DiscoveryGroups_Put.json → ...teOrReplaceDiscoGroup_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...preview/examples/DiscoveryGroups_Get.json → ...yGroups_GetDiscoGroup_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...review/examples/DiscoveryGroups_List.json → ...Groups_ListDiscoGroup_MaximumSet_Gen.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
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
2 changes: 2 additions & 0 deletions
2
...preview/examples/DiscoveryGroups_Run.json → ...yGroups_RunDiscoGroup_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...ew/examples/DiscoveryGroups_Validate.json → ...ps_ValidateDiscoGroup_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...view/examples/DiscoveryTemplates_Get.json → ...ates_GetDiscoTemplate_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...iew/examples/DiscoveryTemplates_List.json → ...tes_ListDiscoTemplate_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...01-preview/examples/Reports_Billable.json → ...w/Reports_GetBillable_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...01-preview/examples/Reports_Snapshot.json → ...w/Reports_GetSnapshot_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...view/examples/Reports_Summary_Assets.json → ...ew/Reports_GetSummary_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...01-preview/examples/SavedFilters_Put.json → ...eOrReplaceSavedFilter_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...preview/examples/SavedFilters_Delete.json → ...ers_DeleteSavedFilter_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...01-preview/examples/SavedFilters_Get.json → ...ilters_GetSavedFilter_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...1-preview/examples/SavedFilters_List.json → ...lters_ListSavedFilter_MaximumSet_Gen.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
24 changes: 24 additions & 0 deletions
24
specification/riskiq/Easm/examples/2023-03-01-preview/Tasks_CancelTask_MaximumSet_Gen.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,24 @@ | ||
{ | ||
"operationId": "Tasks_CancelTask", | ||
"title": "Tasks_CancelTask", | ||
"parameters": { | ||
"api-version": "2023-03-01-preview", | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "dummyrg", | ||
"workspaceName": "ThisisaWorkspace", | ||
"taskId": "ThisisaTaskId" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "ThisisaTaskId", | ||
"startedAt": "2022-05-02T19:30:14.432+00:00", | ||
"completedAt": "2022-05-02T19:30:54.432+00:00", | ||
"lastPolledAt": "2022-05-02T19:30:19.432+00:00", | ||
"state": "complete", | ||
"phase": "complete", | ||
"reason": "This is a Task id" | ||
} | ||
} | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...-03-01-preview/examples/Tasks_Cancel.json → ...preview/Tasks_GetTask_MaximumSet_Gen.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
2 changes: 2 additions & 0 deletions
2
...23-03-01-preview/examples/Tasks_List.json → ...review/Tasks_ListTask_MaximumSet_Gen.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
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,55 @@ | ||
import "@typespec/http"; | ||
import "@typespec/rest"; | ||
import "@azure-tools/typespec-azure-core"; | ||
import "@typespec/versioning"; | ||
import "./routes.tsp"; | ||
import "./models.tsp"; | ||
|
||
using TypeSpec.Http; | ||
using TypeSpec.Rest; | ||
using Azure.Core; | ||
using TypeSpec.Versioning; | ||
|
||
@useAuth( | ||
OAuth2Auth<[ | ||
{ | ||
@doc("implicit flow") | ||
type: OAuth2FlowType.implicit, | ||
|
||
@doc("the authorization URL") | ||
authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", | ||
|
||
@doc("list of scopes for the credential") | ||
scopes: ["https://easm.defender.microsoft.com/.default"], | ||
} | ||
]> | ||
) | ||
@versioned(Easm.Versions) | ||
@service({ | ||
title: "Defender EASM", | ||
}) | ||
@server( | ||
"{endpoint}/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/workspaces/{workspaceName}", | ||
"", | ||
{ | ||
@doc("The endpoint hosting the requested resource. For example, https://{region}.easm.defender.microsoft.com") | ||
endpoint: string, | ||
|
||
@doc("The ID of the target subscription.") | ||
subscriptionId: string, | ||
|
||
@doc("The name of the Resource Group.") | ||
resourceGroupName: string, | ||
|
||
@doc("The name of the Workspace.") | ||
workspaceName: string, | ||
} | ||
) | ||
@doc("Defender EASM discovers and maps your digital attack surface to provide an \"outside-in\" perspective using probes to discover assets. The assets are provided with detailed metadata associated, including vulnerabilities, configurations and web components, allowing customers to view and prioritize external risk. The EASM REST API enables you to develop clients that integrate with your application.") | ||
namespace Easm; | ||
@doc("The EASM Defender service version.") | ||
enum Versions { | ||
@doc("Version 2023-03-01-preview") | ||
@useDependency(Azure.Core.Versions.v1_0_Preview_2) | ||
v2023_03_01_preview: "2023-03-01-preview", | ||
} |
Oops, something went wrong.