Skip to content

Commit

Permalink
Replace '::' with '_' in schema name
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Jan 31, 2024
1 parent 1557f37 commit c5ffa6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions config/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
},
"additionalProperties": false
},
"ManageIQ::Providers::CloudManager::AuthKeyPair": {
"ManageIQ_Providers_CloudManager_AuthKeyPair": {
"type": "object",
"properties": {
"id": {
Expand Down Expand Up @@ -1209,7 +1209,7 @@
},
"additionalProperties": false
},
"ManageIQ::Providers::CloudManager::Template": {
"ManageIQ_Providers_CloudManager_Template": {
"type": "object",
"properties": {
"id": {
Expand Down Expand Up @@ -4256,7 +4256,7 @@
},
"additionalProperties": false
},
"ManageIQ::Providers::CloudManager::Vm": {
"ManageIQ_Providers_CloudManager_Vm": {
"type": "object",
"properties": {
"id": {
Expand Down
5 changes: 3 additions & 2 deletions lib/manageiq/api/open_api/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ def build_schemas
::Api::ApiConfig.collections.each do |_collection_name, collection|
next unless collection.klass

model = collection.klass.constantize
model = collection.klass.constantize
schema_name = model.name.gsub("::", "_")

schemas[model.name] = {
schemas[schema_name] = {
"type" => "object",
"properties" => build_schema_properties(model),
"additionalProperties" => false
Expand Down

0 comments on commit c5ffa6e

Please sign in to comment.