Added new public endpoints

Endpoints autodiscovery

GET .well-known/endpoints

get speakers by summit

GET api/public/v1/summits/{id}/speakers

get speaker by id by summit

GET api/public/v1/summits/{id}/speakers/{speaker_id}

Change-Id: Id735692693097a62e87dc178423711e1736100d5
Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
smarcet
2020-02-28 00:58:55 -03:00
parent b935d2f481
commit 5b449860d0
16 changed files with 621 additions and 140 deletions

View File

@@ -39,6 +39,7 @@ use App\Models\Foundation\Summit\Repositories\ITrackTagGroupAllowedTagsRepositor
use App\Models\Foundation\Summit\SelectionPlan;
use App\Models\Foundation\Summit\Speakers\SpeakerEditPermissionRequest;
use App\Models\Foundation\Summit\TrackTagGroupAllowedTag;
use App\Models\ResourceServer\IApiRepository;
use Illuminate\Support\Facades\App;
use Illuminate\Support\ServiceProvider;
use LaravelDoctrine\ORM\Facades\EntityManager;
@@ -80,6 +81,12 @@ final class RepositoriesProvider extends ServiceProvider
public function register()
{
App::singleton(
IApiRepository::class,
function(){
return EntityManager::getRepository(\App\Models\ResourceServer\Api::class);
});
App::singleton(
'App\Models\ResourceServer\IApiEndpointRepository',
function(){
@@ -92,6 +99,8 @@ final class RepositoriesProvider extends ServiceProvider
return EntityManager::getRepository(\App\Models\ResourceServer\EndPointRateLimitByIP::class);
});
App::singleton(
'models\summit\ISummitRepository',
function(){

View File

@@ -0,0 +1,57 @@
<?php namespace repositories\resource_server;
/**
* Copyright 2020 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 App\Models\ResourceServer\Api;
use App\Models\ResourceServer\IApiRepository;
use App\Repositories\ConfigDoctrineRepository;
use Doctrine\ORM\QueryBuilder;
/**
* Class DoctrineApiRepository
* @package repositories\resource_server
*/
final class DoctrineApiRepository extends ConfigDoctrineRepository
implements IApiRepository
{
/**
* @inheritDoc
*/
protected function getBaseEntity()
{
return Api::class;
}
/**
* @inheritDoc
*/
protected function getFilterMappings()
{
return [];
}
/**
* @inheritDoc
*/
protected function getOrderMappings()
{
return [];
}
/**
* @inheritDoc
*/
protected function applyExtraFilters(QueryBuilder $query)
{
return $query;
}
}