Skip to content

Commit 47d22ee

Browse files
committed
Expand import job examples in the API AF plan
Add more import job examples with usage. Signed-off-by: thc202 <[email protected]>
1 parent f20d217 commit 47d22ee

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

other/af-plans/ApiScanExample.yaml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,22 +231,44 @@ jobs:
231231
return false
232232
}
233233
234+
- type: "postman"
235+
parameters:
236+
collectionFile: postman.json # The target is defined in the collection.
237+
238+
- type: "postman"
239+
parameters:
240+
collectionUrl: "https://api.example.com/postman.json" # The target is defined in the collection.
241+
234242
- type: "graphql"
235243
parameters:
236-
endpoint: # String: the endpoint URL, default: null, no schema is imported
237-
schemaUrl: # String: URL pointing to a GraphQL Schema, default: null, import using introspection on endpoint
238-
schemaFile: # String: Local file path of a GraphQL Schema, default: null, import using schemaUrl
244+
endpoint: "https://www.example.com/api/"
245+
schemaFile: file.graphql
246+
247+
- type: "graphql"
248+
parameters:
249+
endpoint: "https://www.example.com/api/"
250+
schemaUrl: "https://www.example.com/api/file.graphql" # If no schemaFile nor schemaUrl is provided, introspection is done on the endpoint.
251+
252+
- type: "openapi"
253+
parameters:
254+
apiFile: openapi.json # Assumes the definition has the target URL.
255+
256+
- type: "openapi"
257+
parameters:
258+
apiUrl: "https://api.example.com/openapi.json" # Imports from URL, if the definition does not have the target it will be used the domain of the URL.
239259

240260
- type: "openapi"
241261
parameters:
242-
apiFile: # String: Local file containing the OpenAPI definition, default: null, no definition will be imported
243-
apiUrl: # String: URL containing the OpenAPI definition, default: null, no definition will be imported
244-
targetUrl: # String: URL which overrides the target defined in the definition, default: null, the target will not be overridden
262+
apiFile: openapi.json
263+
targetUrl: "https://api.example.com/" # The definition does not have the target, we provide it in the job instead.
264+
265+
- type: "soap"
266+
parameters:
267+
wsdlFile: file.wsdl # The WSDL needs to specify the target locations.
245268

246269
- type: "soap"
247270
parameters:
248-
wsdlFile: # String: Local file path of the WSDL, default: null, no definition will be imported
249-
wsdlUrl: # String: URL pointing to the WSDL, default: null, no definition will be imported
271+
wsdlUrl: "https://api.example.com/file.wsdl" # The WSDL needs to specify the target locations.
250272

251273
- parameters:
252274
policyDefinition:

0 commit comments

Comments
 (0)