diff --git a/Makefile b/Makefile index 57ba731..4441feb 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: code-gen code-gen: rm -rf redfish_client - openapi-generator generate -i ./spec/openapi.yaml -g go -o client/ + openapi-generator generate -i ./spec/openapi.yaml -g go --package-name "client" -o client/ .PHONY: deps deps: diff --git a/client/README.md b/client/README.md index 14eecea..4eed75c 100644 --- a/client/README.md +++ b/client/README.md @@ -1,4 +1,4 @@ -# Go API client for openapi +# Go API client for client Partial Redfish OAPI specification for a limited client @@ -23,7 +23,7 @@ go get github.com/antihax/optional Put the package under your project folder and add the following in import: ```golang -import "./openapi" +import "./client" ``` ## Documentation for API Endpoints diff --git a/client/api_default.go b/client/api_default.go index f96cde1..7694ee9 100644 --- a/client/api_default.go +++ b/client/api_default.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client import ( _context "context" diff --git a/client/client.go b/client/client.go index 3a57da1..44070c0 100644 --- a/client/client.go +++ b/client/client.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client import ( "bytes" diff --git a/client/configuration.go b/client/configuration.go index ce11c96..9ba4d4e 100644 --- a/client/configuration.go +++ b/client/configuration.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client import ( "net/http" diff --git a/client/model_boot.go b/client/model_boot.go index d9fbc83..0339321 100644 --- a/client/model_boot.go +++ b/client/model_boot.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type Boot struct { BootSourceOverrideEnabled BootSourceOverrideEnabled `json:"BootSourceOverrideEnabled,omitempty"` diff --git a/client/model_boot_source.go b/client/model_boot_source.go index 6003111..2b9680d 100644 --- a/client/model_boot_source.go +++ b/client/model_boot_source.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type BootSource string // List of BootSource diff --git a/client/model_boot_source_override_enabled.go b/client/model_boot_source_override_enabled.go index e618a7e..8d64838 100644 --- a/client/model_boot_source_override_enabled.go +++ b/client/model_boot_source_override_enabled.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type BootSourceOverrideEnabled string // List of BootSourceOverrideEnabled diff --git a/client/model_collection.go b/client/model_collection.go index 84503a9..192b680 100644 --- a/client/model_collection.go +++ b/client/model_collection.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client // A Collection of ComputerSystem resource instances. type Collection struct { diff --git a/client/model_computer_system.go b/client/model_computer_system.go index ef6c11c..b1c6d66 100644 --- a/client/model_computer_system.go +++ b/client/model_computer_system.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client // Root redfish path. type ComputerSystem struct { diff --git a/client/model_computer_system_actions.go b/client/model_computer_system_actions.go index 73cf14b..60bfaf9 100644 --- a/client/model_computer_system_actions.go +++ b/client/model_computer_system_actions.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type ComputerSystemActions struct { ComputerSystemReset ComputerSystemReset `json:"#ComputerSystem.Reset,omitempty"` diff --git a/client/model_computer_system_reset.go b/client/model_computer_system_reset.go index bd7b2c0..8c2242a 100644 --- a/client/model_computer_system_reset.go +++ b/client/model_computer_system_reset.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type ComputerSystemReset struct { // The unique identifier for a resource. diff --git a/client/model_health.go b/client/model_health.go index 137539e..dd239d2 100644 --- a/client/model_health.go +++ b/client/model_health.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type Health string // List of Health diff --git a/client/model_id_ref.go b/client/model_id_ref.go index 2f1aba7..f35c275 100644 --- a/client/model_id_ref.go +++ b/client/model_id_ref.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client // A reference to a resource. type IdRef struct { diff --git a/client/model_indicator_led.go b/client/model_indicator_led.go index 3827f62..89e5c71 100644 --- a/client/model_indicator_led.go +++ b/client/model_indicator_led.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type IndicatorLed string // List of IndicatorLED diff --git a/client/model_links.go b/client/model_links.go index 2adebfa..cee1271 100644 --- a/client/model_links.go +++ b/client/model_links.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type Links struct { Chassis []IdRef `json:"Chassis,omitempty"` diff --git a/client/model_memory_summary.go b/client/model_memory_summary.go index cbfc1e7..011a6fb 100644 --- a/client/model_memory_summary.go +++ b/client/model_memory_summary.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type MemorySummary struct { TotalSystemMemoryGiB float32 `json:"TotalSystemMemoryGiB,omitempty"` diff --git a/client/model_message.go b/client/model_message.go index b174263..8f1b2b5 100644 --- a/client/model_message.go +++ b/client/model_message.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type Message struct { Message string `json:"Message,omitempty"` diff --git a/client/model_power_state.go b/client/model_power_state.go index 06bd871..8e56bb5 100644 --- a/client/model_power_state.go +++ b/client/model_power_state.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type PowerState string // List of PowerState diff --git a/client/model_processor_summary.go b/client/model_processor_summary.go index 97a3e9a..db78980 100644 --- a/client/model_processor_summary.go +++ b/client/model_processor_summary.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type ProcessorSummary struct { Count int32 `json:"Count,omitempty"` diff --git a/client/model_redfish_error.go b/client/model_redfish_error.go index 4a77c19..8999d51 100644 --- a/client/model_redfish_error.go +++ b/client/model_redfish_error.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client // Contains an error payload from a Redfish Service. type RedfishError struct { diff --git a/client/model_redfish_error_error.go b/client/model_redfish_error_error.go index 693d616..4d1a6c9 100644 --- a/client/model_redfish_error_error.go +++ b/client/model_redfish_error_error.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type RedfishErrorError struct { MessageExtendedInfo []Message `json:"@Message.ExtendedInfo,omitempty"` diff --git a/client/model_reset_request_body.go b/client/model_reset_request_body.go index 59ae62b..df9d791 100644 --- a/client/model_reset_request_body.go +++ b/client/model_reset_request_body.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type ResetRequestBody struct { ResetType ResetType `json:"ResetType,omitempty"` diff --git a/client/model_reset_type.go b/client/model_reset_type.go index 4f0fabc..d64024b 100644 --- a/client/model_reset_type.go +++ b/client/model_reset_type.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type ResetType string // List of ResetType diff --git a/client/model_root.go b/client/model_root.go index b7b991f..96c1044 100644 --- a/client/model_root.go +++ b/client/model_root.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client // Root redfish path. type Root struct { diff --git a/client/model_state.go b/client/model_state.go index 0552f0d..00016fe 100644 --- a/client/model_state.go +++ b/client/model_state.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type State string // List of State diff --git a/client/model_status.go b/client/model_status.go index 8c5e909..57edb12 100644 --- a/client/model_status.go +++ b/client/model_status.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client type Status struct { Health Health `json:"Health,omitempty"` diff --git a/client/response.go b/client/response.go index 4e45b69..74b02a4 100644 --- a/client/response.go +++ b/client/response.go @@ -7,7 +7,7 @@ * Generated by: OpenAPI Generator (https://openapi-generator.tech) */ -package openapi +package client import ( "net/http"