Skip to content

Commit 00657d1

Browse files
Copilotdisplague
andcommitted
Add struct field documentation extraction and improve API error handling
Co-authored-by: displague <317653+displague@users.noreply.github.com>
1 parent 8950f84 commit 00657d1

52 files changed

Lines changed: 30521 additions & 407 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmd/descriptions/fabricv4.json

Lines changed: 30024 additions & 69 deletions
Large diffs are not rendered by default.

cmd/extract-descriptions/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ func main() {
2929

3030
fmt.Printf("Found %d services\n", len(descriptions.Services))
3131
for name, service := range descriptions.Services {
32-
fmt.Printf(" - %s: %d methods\n", name, len(service.Methods))
32+
fmt.Printf(" - %s: %d methods, %d types\n", name, len(service.Methods), len(service.Types))
3333
}
34+
fmt.Printf("Found %d global types\n", len(descriptions.Types))
3435

3536
fmt.Printf("Saving descriptions to: %s\n", *outputFile)
3637
if err := descriptions.SaveToFile(*outputFile); err != nil {

docs/equinix_fabricv4_cloud-events_search-cloud-events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ equinix fabricv4 cloud-events search-cloud-events [flags]
1919
--cloud-event-search-request-filter-additional-properties string cloud-event-search-request-filter-additional-properties (JSON)
2020
--cloud-event-search-request-filter-and string cloud-event-search-request-filter-and (JSON array)
2121
--cloud-event-search-request-pagination-additional-properties string cloud-event-search-request-pagination-additional-properties (JSON)
22-
--cloud-event-search-request-pagination-limit int cloud-event-search-request-pagination-limit
23-
--cloud-event-search-request-pagination-offset int cloud-event-search-request-pagination-offset
22+
--cloud-event-search-request-pagination-limit int Number of elements to be requested per page. Number must be between 1 and 100, and the default is 20.
23+
--cloud-event-search-request-pagination-offset int Index of the first element.
2424
-h, --help help for search-cloud-events
2525
--request string JSON payload for additional optional fields not exposed as flags
2626
```

docs/equinix_fabricv4_cloud-routers_create-cloud-router-action.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ equinix fabricv4 cloud-routers create-cloud-router-action [flags]
1717
```
1818
--cloud-router-action-request-additional-properties string cloud-router-action-request-additional-properties (required) (JSON)
1919
--cloud-router-action-request-connection-additional-properties string cloud-router-action-request-connection-additional-properties (JSON)
20-
--cloud-router-action-request-connection-uuid string cloud-router-action-request-connection-uuid
20+
--cloud-router-action-request-connection-uuid string Connection UUID
2121
--cloud-router-action-request-type string cloud-router-action-request-type (required)
2222
-h, --help help for create-cloud-router-action
2323
--request string JSON payload for additional optional fields not exposed as flags

docs/equinix_fabricv4_cloud-routers_create-cloud-router-command.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ equinix fabricv4 cloud-routers create-cloud-router-command [flags]
1616

1717
```
1818
--cloud-router-command-post-request-additional-properties string cloud-router-command-post-request-additional-properties (required) (JSON)
19-
--cloud-router-command-post-request-description string cloud-router-command-post-request-description
20-
--cloud-router-command-post-request-name string cloud-router-command-post-request-name
19+
--cloud-router-command-post-request-description string Customer-provided Cloud Router Command description
20+
--cloud-router-command-post-request-name string Customer-provided Cloud Router Command name
2121
--cloud-router-command-post-request-project-additional-properties string cloud-router-command-post-request-project-additional-properties (required) (JSON)
22-
--cloud-router-command-post-request-project-project-id string cloud-router-command-post-request-project-project-id (required)
22+
--cloud-router-command-post-request-project-project-id string Subscriber-assigned project ID (required)
2323
--cloud-router-command-post-request-request-additional-properties string cloud-router-command-post-request-request-additional-properties (required) (JSON)
24-
--cloud-router-command-post-request-request-data-bytes int cloud-router-command-post-request-request-data-bytes
25-
--cloud-router-command-post-request-request-destination string cloud-router-command-post-request-request-destination (required)
26-
--cloud-router-command-post-request-request-hops-max int cloud-router-command-post-request-request-hops-max
27-
--cloud-router-command-post-request-request-probes int cloud-router-command-post-request-request-probes
24+
--cloud-router-command-post-request-request-data-bytes PING_COMMAND Ping Command DataBytes. This field is only applicable for commands of type PING_COMMAND.
25+
--cloud-router-command-post-request-request-destination string Fabric Cloud Router Ping or Traceroute Command Destination (required)
26+
--cloud-router-command-post-request-request-hops-max TRACEROUTE_COMMAND Maximum number of hops for the traceroute command. This field is only applicable for commands of type TRACEROUTE_COMMAND.
27+
--cloud-router-command-post-request-request-probes TRACEROUTE_COMMAND Number of probes for Fabric Cloud Router Traceroute Command. This field is only applicable for commands of type TRACEROUTE_COMMAND and is not configurable.
2828
--cloud-router-command-post-request-request-source-connection string cloud-router-command-post-request-request-source-connection (JSON)
29-
--cloud-router-command-post-request-request-timeout int cloud-router-command-post-request-request-timeout
29+
--cloud-router-command-post-request-request-timeout PING_COMMAND Timeout in seconds for Fabric Cloud Router Command: - For PING_COMMAND: Packet timeout duration. The default value is 5. - For `TRACEROUTE_COMMAND`: Probe timeout duration. The default value is 2 and it is not configurable.
3030
--cloud-router-command-post-request-type string cloud-router-command-post-request-type (required)
3131
-h, --help help for create-cloud-router-command
3232
--request string JSON payload for additional optional fields not exposed as flags

docs/equinix_fabricv4_cloud-routers_create-cloud-router.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,44 +15,44 @@ equinix fabricv4 cloud-routers create-cloud-router [flags]
1515
### Options
1616

1717
```
18-
--cloud-router-post-request-account-account-name string cloud-router-post-request-account-account-name
19-
--cloud-router-post-request-account-account-number int cloud-router-post-request-account-account-number
18+
--cloud-router-post-request-account-account-name string Account name
19+
--cloud-router-post-request-account-account-number int Account number
2020
--cloud-router-post-request-account-additional-properties string cloud-router-post-request-account-additional-properties (JSON)
21-
--cloud-router-post-request-account-global-cust-id string cloud-router-post-request-account-global-cust-id
22-
--cloud-router-post-request-account-global-org-id string cloud-router-post-request-account-global-org-id
23-
--cloud-router-post-request-account-global-organization-name string cloud-router-post-request-account-global-organization-name
24-
--cloud-router-post-request-account-org-id int cloud-router-post-request-account-org-id
25-
--cloud-router-post-request-account-organization-name string cloud-router-post-request-account-organization-name
26-
--cloud-router-post-request-account-reseller-account-name string cloud-router-post-request-account-reseller-account-name
27-
--cloud-router-post-request-account-reseller-account-number int cloud-router-post-request-account-reseller-account-number
28-
--cloud-router-post-request-account-reseller-org-id int cloud-router-post-request-account-reseller-org-id
29-
--cloud-router-post-request-account-reseller-ucm-id string cloud-router-post-request-account-reseller-ucm-id
30-
--cloud-router-post-request-account-ucm-id string cloud-router-post-request-account-ucm-id
21+
--cloud-router-post-request-account-global-cust-id string Account name
22+
--cloud-router-post-request-account-global-org-id string Global organization identifier
23+
--cloud-router-post-request-account-global-organization-name string Global organization name
24+
--cloud-router-post-request-account-org-id int Customer organization identifier
25+
--cloud-router-post-request-account-organization-name string Customer organization name
26+
--cloud-router-post-request-account-reseller-account-name string Reseller account name
27+
--cloud-router-post-request-account-reseller-account-number int Reseller account number
28+
--cloud-router-post-request-account-reseller-org-id int Reseller customer organization identifier
29+
--cloud-router-post-request-account-reseller-ucm-id string Reseller account ucmId
30+
--cloud-router-post-request-account-ucm-id string Account ucmId
3131
--cloud-router-post-request-additional-properties string cloud-router-post-request-additional-properties (required) (JSON)
3232
--cloud-router-post-request-location-additional-properties string cloud-router-post-request-location-additional-properties (required) (JSON)
3333
--cloud-router-post-request-location-metro-code string cloud-router-post-request-location-metro-code (required)
34-
--cloud-router-post-request-location-metro-href string cloud-router-post-request-location-metro-href
34+
--cloud-router-post-request-location-metro-href string The Canonical URL at which the resource resides.
3535
--cloud-router-post-request-location-metro-name string cloud-router-post-request-location-metro-name
3636
--cloud-router-post-request-location-region string cloud-router-post-request-location-region
3737
--cloud-router-post-request-marketplace-subscription-additional-properties string cloud-router-post-request-marketplace-subscription-additional-properties (JSON)
38-
--cloud-router-post-request-marketplace-subscription-href string cloud-router-post-request-marketplace-subscription-href
38+
--cloud-router-post-request-marketplace-subscription-href string Marketplace Subscription URI
3939
--cloud-router-post-request-marketplace-subscription-type string cloud-router-post-request-marketplace-subscription-type
40-
--cloud-router-post-request-marketplace-subscription-uuid string cloud-router-post-request-marketplace-subscription-uuid
41-
--cloud-router-post-request-name string cloud-router-post-request-name (required)
42-
--cloud-router-post-request-notifications string cloud-router-post-request-notifications (JSON array)
40+
--cloud-router-post-request-marketplace-subscription-uuid string Equinix-assigned Marketplace Subscription identifier
41+
--cloud-router-post-request-name string Customer-provided Cloud Router name (required)
42+
--cloud-router-post-request-notifications string Preferences for notifications on connection configuration or status changes (JSON array)
4343
--cloud-router-post-request-order-additional-properties string cloud-router-post-request-order-additional-properties (JSON)
44-
--cloud-router-post-request-order-billing-tier string cloud-router-post-request-order-billing-tier
45-
--cloud-router-post-request-order-customer-reference-number string cloud-router-post-request-order-customer-reference-number
46-
--cloud-router-post-request-order-order-id string cloud-router-post-request-order-order-id
47-
--cloud-router-post-request-order-order-number string cloud-router-post-request-order-order-number
48-
--cloud-router-post-request-order-purchase-order-number string cloud-router-post-request-order-purchase-order-number
49-
--cloud-router-post-request-order-term-length int cloud-router-post-request-order-term-length
44+
--cloud-router-post-request-order-billing-tier string Billing tier for connection bandwidth
45+
--cloud-router-post-request-order-customer-reference-number string Customer reference number
46+
--cloud-router-post-request-order-order-id string Order Identification
47+
--cloud-router-post-request-order-order-number string Order Reference Number
48+
--cloud-router-post-request-order-purchase-order-number string Purchase order number
49+
--cloud-router-post-request-order-term-length int Term length in months, valid values are 1, 12, 24, 36 where 1 is the default value (for on-demand case).
5050
--cloud-router-post-request-package-additional-properties string cloud-router-post-request-package-additional-properties (required) (JSON)
5151
--cloud-router-post-request-package-code string cloud-router-post-request-package-code (required)
52-
--cloud-router-post-request-package-href string cloud-router-post-request-package-href
52+
--cloud-router-post-request-package-href string Fabric Cloud Router URI
5353
--cloud-router-post-request-package-type string cloud-router-post-request-package-type
5454
--cloud-router-post-request-project-additional-properties string cloud-router-post-request-project-additional-properties (JSON)
55-
--cloud-router-post-request-project-project-id string cloud-router-post-request-project-project-id
55+
--cloud-router-post-request-project-project-id string Subscriber-assigned project ID
5656
--cloud-router-post-request-type string cloud-router-post-request-type (required)
5757
--dry-run dry-run field (required)
5858
-h, --help help for create-cloud-router

docs/equinix_fabricv4_cloud-routers_search-cloud-router-commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ equinix fabricv4 cloud-routers search-cloud-router-commands [flags]
1919
--cloud-router-command-search-request-filter-additional-properties string cloud-router-command-search-request-filter-additional-properties (JSON)
2020
--cloud-router-command-search-request-filter-and string cloud-router-command-search-request-filter-and (JSON array)
2121
--cloud-router-command-search-request-pagination-additional-properties string cloud-router-command-search-request-pagination-additional-properties (JSON)
22-
--cloud-router-command-search-request-pagination-limit int cloud-router-command-search-request-pagination-limit
23-
--cloud-router-command-search-request-pagination-offset int cloud-router-command-search-request-pagination-offset
22+
--cloud-router-command-search-request-pagination-limit int Number of elements to be requested per page. Number must be between 1 and 100, and the default is 20.
23+
--cloud-router-command-search-request-pagination-offset int Index of the first element.
2424
--cloud-router-command-search-request-sort string cloud-router-command-search-request-sort (JSON array)
2525
-h, --help help for search-cloud-router-commands
2626
--request string JSON payload for additional optional fields not exposed as flags

docs/equinix_fabricv4_cloud-routers_search-cloud-router-routes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ equinix fabricv4 cloud-routers search-cloud-router-routes [flags]
2121
--route-table-entry-search-request-filter-additional-properties string route-table-entry-search-request-filter-additional-properties (JSON)
2222
--route-table-entry-search-request-filter-and string route-table-entry-search-request-filter-and (JSON array)
2323
--route-table-entry-search-request-pagination-additional-properties string route-table-entry-search-request-pagination-additional-properties (JSON)
24-
--route-table-entry-search-request-pagination-limit int route-table-entry-search-request-pagination-limit
25-
--route-table-entry-search-request-pagination-offset int route-table-entry-search-request-pagination-offset
24+
--route-table-entry-search-request-pagination-limit int Number of elements to be requested per page. Number must be between 1 and 100, and the default is 20.
25+
--route-table-entry-search-request-pagination-offset int Index of the first element.
2626
--route-table-entry-search-request-sort string route-table-entry-search-request-sort (JSON array)
2727
--router-id string Router UUID (required)
2828
```

docs/equinix_fabricv4_cloud-routers_search-cloud-routers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ equinix fabricv4 cloud-routers search-cloud-routers [flags]
1919
--cloud-router-search-request-filter-additional-properties string cloud-router-search-request-filter-additional-properties (JSON)
2020
--cloud-router-search-request-filter-and string cloud-router-search-request-filter-and (JSON array)
2121
--cloud-router-search-request-pagination-additional-properties string cloud-router-search-request-pagination-additional-properties (JSON)
22-
--cloud-router-search-request-pagination-limit int cloud-router-search-request-pagination-limit
23-
--cloud-router-search-request-pagination-offset int cloud-router-search-request-pagination-offset
22+
--cloud-router-search-request-pagination-limit int Number of elements to be requested per page. Number must be between 1 and 100, and the default is 20.
23+
--cloud-router-search-request-pagination-offset int Index of the first element.
2424
--cloud-router-search-request-sort string cloud-router-search-request-sort (JSON array)
2525
-h, --help help for search-cloud-routers
2626
--request string JSON payload for additional optional fields not exposed as flags

0 commit comments

Comments
 (0)