Skip to content

Commit

Permalink
router generation complete (but not final)
Browse files Browse the repository at this point in the history
  • Loading branch information
battis committed Feb 21, 2024
1 parent 909464e commit 35d0d79
Show file tree
Hide file tree
Showing 520 changed files with 7,815 additions and 3,669 deletions.
11 changes: 11 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
"email": "sbattis@groton.org"
}
],
"repositories": [
{
"type": "path",
"url": "../openapi-client-generator"
},
{
"type": "path",
"url": "../php-generator"
}
],
"require": {
"groton-school/oauth2-blackbaudsky": "^0.2.3",
"psr/simple-cache": "^3.0"
Expand All @@ -23,6 +33,7 @@
},
"require-dev": {
"battis/openapi-client-generator": "dev-main",
"battis/php-generator": "dev-main",
"monolog/monolog": "^3.0",
"pahanini/monolog-cli-formatter": "^2.0",
"php-di/php-di": "^7.0",
Expand Down
60 changes: 47 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions scripts/map
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,28 @@
use Battis\DataUtilities\Path;
use Battis\Loggable\Loggable;
use Battis\OpenAPI\CLI\Map;
use Battis\OpenAPI\Generator\Sanitize;
use cebe\openapi\spec\OpenApi;
use Monolog\Handler\ErrorLogHandler;
use Monolog\Logger;
use pahanini\Monolog\Formatter\CliFormatter;

require __DIR__ . "/../vendor/autoload.php";

class MySanitize extends Sanitize {
public static function getInstance(): Sanitize
{
if (parent::$instance === null) {
parent::$instance = new MySanitize();
}
return parent::$instance;
}
public function rename(string $name): string
{
return $name . "Renamed";
}
}

class BlackbaudMap extends Map {
protected function getNamespaceFromSpec(string $specPath, OpenApi $spec, string $baseNamespace): string
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Blackbaud\SKY\OneRoster\Objects;
namespace Blackbaud\SKY\OneRoster\Components;

use Battis\OpenAPI\Client\BaseObject;

Expand All @@ -9,20 +9,20 @@
* @property string $startDate
* @property string $endDate
* @property string $type
* @property \Blackbaud\SKY\OneRoster\Objects\GuidRefModel $parent
* @property \Blackbaud\SKY\OneRoster\Objects\GuidRefModel[] $children
* @property \Blackbaud\SKY\OneRoster\Components\GuidRefModel $parent
* @property \Blackbaud\SKY\OneRoster\Components\GuidRefModel[] $children
* @property string $schoolYear
* @property string $sourcedId
* @property string $status
* @property string $dateLastModified
* @property string[] $metadata
* @property \string[] $metadata
*
* @api
*/
class AcademicSessionModel extends BaseObject
{
/**
* @var string[] fields
* @var \string[] $fields
*/
protected static array $fields = [
"title",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
<?php

namespace Blackbaud\SKY\OneRoster\Objects;
namespace Blackbaud\SKY\OneRoster\Components;

use Battis\OpenAPI\Client\BaseObject;

/**
* @property \Blackbaud\SKY\OneRoster\Objects\AcademicSessionModel
* @property \Blackbaud\SKY\OneRoster\Components\AcademicSessionModel
* $academicSession
* @property \Blackbaud\SKY\OneRoster\Objects\StatusInfoModel[] $statusInfoSet
* @property \Blackbaud\SKY\OneRoster\Components\StatusInfoModel[]
* $statusInfoSet
*
* @api
*/
class AcademicSessionOutputModel extends BaseObject
{
/**
* @var string[] fields
* @var \string[] $fields
*/
protected static array $fields = [
"academicSession",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
<?php

namespace Blackbaud\SKY\OneRoster\Objects;
namespace Blackbaud\SKY\OneRoster\Components;

use Battis\OpenAPI\Client\BaseObject;

/**
* @property \Blackbaud\SKY\OneRoster\Objects\AcademicSessionModel[]
* @property \Blackbaud\SKY\OneRoster\Components\AcademicSessionModel[]
* $academicSessions
* @property \Blackbaud\SKY\OneRoster\Objects\StatusInfoModel[] $statusInfoSet
* @property \Blackbaud\SKY\OneRoster\Components\StatusInfoModel[]
* $statusInfoSet
*
* @api
*/
class AcademicSessionsOutputModel extends BaseObject
{
/**
* @var string[] fields
* @var \string[] $fields
*/
protected static array $fields = [
"academicSessions",
Expand Down
23 changes: 23 additions & 0 deletions src/SKY/OneRoster/Components/CategoriesOutputModel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Blackbaud\SKY\OneRoster\Components;

use Battis\OpenAPI\Client\BaseObject;

/**
* @property \Blackbaud\SKY\OneRoster\Components\CategoryModel[] $categories
* @property \Blackbaud\SKY\OneRoster\Components\StatusInfoModel[]
* $statusInfoSet
*
* @api
*/
class CategoriesOutputModel extends BaseObject
{
/**
* @var \string[] $fields
*/
protected static array $fields = [
"categories",
"statusInfoSet",
];
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

namespace Blackbaud\SKY\OneRoster\Objects;
namespace Blackbaud\SKY\OneRoster\Components;

use Battis\OpenAPI\Client\BaseObject;

/**
* @property \Blackbaud\SKY\OneRoster\Objects\CategoryModel $category
* @property \Blackbaud\SKY\OneRoster\Components\CategoryModel $category
*
* @api
*/
class CategoryInputModel extends BaseObject
{
/**
* @var string[] fields
* @var \string[] $fields
*/
protected static array $fields = [
"category",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Blackbaud\SKY\OneRoster\Objects;
namespace Blackbaud\SKY\OneRoster\Components;

use Battis\OpenAPI\Client\BaseObject;

Expand All @@ -9,14 +9,14 @@
* @property string $sourcedId
* @property string $status
* @property string $dateLastModified
* @property string[] $metadata
* @property \string[] $metadata
*
* @api
*/
class CategoryModel extends BaseObject
{
/**
* @var string[] fields
* @var \string[] $fields
*/
protected static array $fields = [
"title",
Expand Down
23 changes: 23 additions & 0 deletions src/SKY/OneRoster/Components/CategoryOutputModel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Blackbaud\SKY\OneRoster\Components;

use Battis\OpenAPI\Client\BaseObject;

/**
* @property \Blackbaud\SKY\OneRoster\Components\CategoryModel $category
* @property \Blackbaud\SKY\OneRoster\Components\StatusInfoModel[]
* $statusInfoSet
*
* @api
*/
class CategoryOutputModel extends BaseObject
{
/**
* @var \string[] $fields
*/
protected static array $fields = [
"category",
"statusInfoSet",
];
}
Loading

0 comments on commit 35d0d79

Please sign in to comment.