Skip to content

Commit

Permalink
update samples (#19882)
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 authored Oct 16, 2024
1 parent c487a6e commit 8f7d9f7
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,8 @@ paths:
put:
tags:
- user
servers:
- url: http://user.petstore.swagger.io/v2
summary: Updated user
description: This can only be done by the logged in user.
operationId: updateUser
Expand Down Expand Up @@ -572,6 +574,7 @@ paths:
description: User not found
servers:
- url: http://petstore.swagger.io/v2
- url: http://localhost:8080/v2
components:
requestBodies:
UserArray:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ void PFXPetApi::initializeServerConfigs() {
QUrl("http://petstore.swagger.io/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
defaultConf.append(PFXServerConfiguration(
QUrl("http://localhost:8080/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
_serverConfigs.insert("addPet", defaultConf);
_serverIndices.insert("addPet", 0);
_serverConfigs.insert("allPets", defaultConf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ void PFXPrimitivesApi::initializeServerConfigs() {
QUrl("http://petstore.swagger.io/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
defaultConf.append(PFXServerConfiguration(
QUrl("http://localhost:8080/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
_serverConfigs.insert("primitivesIntegerPost", defaultConf);
_serverIndices.insert("primitivesIntegerPost", 0);
_serverConfigs.insert("primitivesNumberPut", defaultConf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ void PFXStoreApi::initializeServerConfigs() {
QUrl("http://petstore.swagger.io/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
defaultConf.append(PFXServerConfiguration(
QUrl("http://localhost:8080/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
_serverConfigs.insert("deleteOrder", defaultConf);
_serverIndices.insert("deleteOrder", 0);
_serverConfigs.insert("getInventory", defaultConf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ void PFXUserApi::initializeServerConfigs() {
QUrl("http://petstore.swagger.io/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
defaultConf.append(PFXServerConfiguration(
QUrl("http://localhost:8080/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
_serverConfigs.insert("createUser", defaultConf);
_serverIndices.insert("createUser", 0);
_serverConfigs.insert("createUsersWithArrayInput", defaultConf);
Expand All @@ -49,8 +53,15 @@ void PFXUserApi::initializeServerConfigs() {
_serverIndices.insert("loginUser", 0);
_serverConfigs.insert("logoutUser", defaultConf);
_serverIndices.insert("logoutUser", 0);
_serverConfigs.insert("updateUser", defaultConf);
_serverIndices.insert("updateUser", 0);
{
QList<PFXServerConfiguration> serverConf = QList<PFXServerConfiguration>();
serverConf.append(PFXServerConfiguration(
QUrl("http://user.petstore.swagger.io/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
_serverConfigs.insert("updateUser", serverConf);
_serverIndices.insert("updateUser", 0);
}
}

/**
Expand Down
4 changes: 4 additions & 0 deletions samples/client/petstore/cpp-qt/client/PFXPetApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ void PFXPetApi::initializeServerConfigs() {
QUrl("http://petstore.swagger.io/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
defaultConf.append(PFXServerConfiguration(
QUrl("http://localhost:8080/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
_serverConfigs.insert("addPet", defaultConf);
_serverIndices.insert("addPet", 0);
_serverConfigs.insert("allPets", defaultConf);
Expand Down
4 changes: 4 additions & 0 deletions samples/client/petstore/cpp-qt/client/PFXPrimitivesApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ void PFXPrimitivesApi::initializeServerConfigs() {
QUrl("http://petstore.swagger.io/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
defaultConf.append(PFXServerConfiguration(
QUrl("http://localhost:8080/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
_serverConfigs.insert("primitivesIntegerPost", defaultConf);
_serverIndices.insert("primitivesIntegerPost", 0);
_serverConfigs.insert("primitivesNumberPut", defaultConf);
Expand Down
4 changes: 4 additions & 0 deletions samples/client/petstore/cpp-qt/client/PFXStoreApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ void PFXStoreApi::initializeServerConfigs() {
QUrl("http://petstore.swagger.io/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
defaultConf.append(PFXServerConfiguration(
QUrl("http://localhost:8080/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
_serverConfigs.insert("deleteOrder", defaultConf);
_serverIndices.insert("deleteOrder", 0);
_serverConfigs.insert("getInventory", defaultConf);
Expand Down
15 changes: 13 additions & 2 deletions samples/client/petstore/cpp-qt/client/PFXUserApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ void PFXUserApi::initializeServerConfigs() {
QUrl("http://petstore.swagger.io/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
defaultConf.append(PFXServerConfiguration(
QUrl("http://localhost:8080/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
_serverConfigs.insert("createUser", defaultConf);
_serverIndices.insert("createUser", 0);
_serverConfigs.insert("createUsersWithArrayInput", defaultConf);
Expand All @@ -49,8 +53,15 @@ void PFXUserApi::initializeServerConfigs() {
_serverIndices.insert("loginUser", 0);
_serverConfigs.insert("logoutUser", defaultConf);
_serverIndices.insert("logoutUser", 0);
_serverConfigs.insert("updateUser", defaultConf);
_serverIndices.insert("updateUser", 0);
{
QList<PFXServerConfiguration> serverConf = QList<PFXServerConfiguration>();
serverConf.append(PFXServerConfiguration(
QUrl("http://user.petstore.swagger.io/v2"),
"No description provided",
QMap<QString, PFXServerVariable>()));
_serverConfigs.insert("updateUser", serverConf);
_serverIndices.insert("updateUser", 0);
}
}

/**
Expand Down

0 comments on commit 8f7d9f7

Please sign in to comment.