35fc57473c
POST /api/v1/sponsored-projects payload name description is_active scope REALM_URL/sponsored-projects/write GET /api/v1/sponsored-projects scope REALM_URL/sponsored-projects/read PUT /api/v1/sponsored-projects/{id} payload name description is_active scope REALM_URL/sponsored-projects/write GET /api/v1/sponsored-projects/{id} scope REALM_URL/sponsored-projects/read PUBLIC GET /api/public/v1/sponsored-projects/{slug} DELETE /api/v1/sponsored-projects/{id} scope REALM_URL/sponsored-projects/write POST /api/v1/sponsored-projects/{id}/sponsorship-types payload name description is_active order scope REALM_URL/sponsored-projects/write GET /api/v1/sponsored-projects/{id}/sponsorship-types scope REALM_URL/sponsored-projects/read GET /api/v1/sponsored-projects/{id}/sponsorship-types/{id} scope REALM_URL/sponsored-projects/read DELETE /api/v1/sponsored-projects/{id}/sponsorship-types/{id} scope REALM_URL/sponsored-projects/write PUT /api/v1/sponsored-projects/{id}/sponsorship-types/{id} payload name description is_active order scope REALM_URL/sponsored-projects/write PUT /api/v1/sponsored-projects/{id}/sponsorship-types/{id}/supporting-companies/{id} payload order (optional) scope REALM_URL/sponsored-projects/write DELETE /api/v1/sponsored-projects/{id}/sponsorship-types/{id}/supporting-companies/{id} scope REALM_URL/sponsored-projects/write GET /api/v1/sponsored-projects/{id}/sponsorship-types/{id}/supporting-companies scope REALM_URL/sponsored-projects/read Change-Id: I9c0b1bb457a1c583afd284f56f2aced5deceaa02 Signed-off-by: smarcet <smarcet@gmail.com>
155 lines
3.7 KiB
PHP
155 lines
3.7 KiB
PHP
<?php
|
|
/**
|
|
* Copyright 2015 OpenStack Foundation
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
**/
|
|
|
|
use Illuminate\Database\Seeder;
|
|
use App\Models\ResourceServer\Api;
|
|
use LaravelDoctrine\ORM\Facades\EntityManager;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
/**
|
|
* Class ApisTableSeeder
|
|
*/
|
|
final class ApiSeeder extends Seeder
|
|
{
|
|
|
|
public function run()
|
|
{
|
|
|
|
DB::table('endpoint_api_scopes')->delete();
|
|
DB::table('endpoint_api_authz_groups')->delete();
|
|
DB::table('api_scopes')->delete();
|
|
DB::table('api_endpoints')->delete();
|
|
DB::table('apis')->delete();
|
|
|
|
// summit
|
|
|
|
$api = new Api();
|
|
$api->setName('summits');
|
|
$api->setActive(true);
|
|
$api->setDescription('Summit API');
|
|
|
|
EntityManager::persist($api);
|
|
|
|
EntityManager::flush();
|
|
|
|
// members
|
|
|
|
$api = new Api();
|
|
$api->setName('members');
|
|
$api->setActive(true);
|
|
$api->setDescription('Members API');
|
|
|
|
EntityManager::persist($api);
|
|
|
|
EntityManager::flush();
|
|
|
|
//tags
|
|
|
|
$api = new Api();
|
|
$api->setName('tags');
|
|
$api->setActive(true);
|
|
$api->setDescription('tags API');
|
|
|
|
EntityManager::persist($api);
|
|
|
|
EntityManager::flush();
|
|
|
|
//companies
|
|
|
|
$api = new Api();
|
|
$api->setName('companies');
|
|
$api->setActive(true);
|
|
$api->setDescription('companies API');
|
|
|
|
EntityManager::persist($api);
|
|
|
|
EntityManager::flush();
|
|
|
|
// sponsored projects
|
|
$api = new Api();
|
|
$api->setName('sponsored-projects');
|
|
$api->setActive(true);
|
|
$api->setDescription('Sponsored Projects API');
|
|
|
|
EntityManager::persist($api);
|
|
|
|
EntityManager::flush();
|
|
|
|
//groups
|
|
|
|
$api = new Api();
|
|
$api->setName('groups');
|
|
$api->setActive(true);
|
|
$api->setDescription('groups API');
|
|
|
|
EntityManager::persist($api);
|
|
|
|
EntityManager::flush();
|
|
|
|
|
|
// teams
|
|
|
|
$api = new Api();
|
|
$api->setName('teams');
|
|
$api->setActive(true);
|
|
$api->setDescription('Teams API');
|
|
|
|
EntityManager::persist($api);
|
|
|
|
EntityManager::flush();
|
|
|
|
// organizations
|
|
|
|
$api = new Api();
|
|
$api->setName('organizations');
|
|
$api->setActive(true);
|
|
$api->setDescription('Organizations API');
|
|
|
|
EntityManager::persist($api);
|
|
|
|
EntityManager::flush();
|
|
|
|
// track question templates
|
|
|
|
$api = new Api();
|
|
$api->setName('track-question-templates');
|
|
$api->setActive(true);
|
|
$api->setDescription('Track Question Templates API');
|
|
|
|
EntityManager::persist($api);
|
|
|
|
EntityManager::flush();
|
|
|
|
// summit administrator groups
|
|
|
|
$api = new Api();
|
|
$api->setName('summit-administrator-groups');
|
|
$api->setActive(true);
|
|
$api->setDescription('Summit Administrator Groups API');
|
|
|
|
EntityManager::persist($api);
|
|
|
|
// summit-media-file-types
|
|
|
|
$api = new Api();
|
|
$api->setName('summit-media-file-types');
|
|
$api->setActive(true);
|
|
$api->setDescription('Summit Media File Types API');
|
|
|
|
EntityManager::persist($api);
|
|
|
|
EntityManager::flush();
|
|
|
|
}
|
|
} |