Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api] Update PHP namespaces #1202 #1203

Merged
merged 2 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# Generated by Cargo
# will have compiled files and executables
/target/
dist/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

lcov.info
.db.agdb
db.agdb
Expand All @@ -28,3 +20,4 @@ coverage/
node_modules/
openapitools.json
.openapi-generator/
composer.lock
6 changes: 3 additions & 3 deletions agdb_api/php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: Token
$config = Agdb\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$config = Agnesoft\\AgdbApi\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Agdb\Api\AgdbApi(
$apiInstance = new Agnesoft\\AgdbApi\Api\AgdbApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$owner = 'owner_example'; // string | user name
$db = 'db_example'; // string | db name
$db_type = new \Agdb\Model\DbType(); // DbType
$db_type = new \Agnesoft\\AgdbApi\Model\DbType(); // DbType

try {
$apiInstance->adminDbAdd($owner, $db, $db_type);
Expand Down
3 changes: 2 additions & 1 deletion agdb_api/php/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ function generate_api() {
-i ../../agdb_server/openapi/schema.json \
-g php \
-o ./ \
--additional-properties=invokerPackage=Agdb,artifactVersion=0.7.2
--additional-properties=invokerPackage="Agnesoft\AgdbApi",artifactVersion=0.7.2
for f in $(find lib/ -name '*.php'); do sed -i -e 's/Agnesoft\\\\AgdbApi/Agnesoft\\AgdbApi/g' $f; done
echo "Y" | composer dump-autoload -o
}

Expand Down
Loading
Loading