Skip to content

Commit

Permalink
Repair bug in swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubert Krzysztofiak committed Feb 15, 2022
1 parent bc578a0 commit 2cc4f3f
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: COMPOSER_ROOT_VERSION=0.9.9 composer update

- name: Require composer swagger package
run: composer require darkaonline/l5-swagger:8.1.0
run: composer require darkaonline/l5-swagger:8.1.0 zircote/swagger-php:3.3.3 swagger-api/swagger-ui:v3.52.5

- name: Discover packages
run: vendor/bin/testbench package:discover --ansi
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ composer.lock
openapi.json
.env
scorm
.DS_Store
38 changes: 38 additions & 0 deletions database/migrations/2022_02_15_104923_remove_participant_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

use EscolaLms\Consultations\Enum\ConsultationParticipantStatusEnum;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class RemoveParticipantTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::dropIfExists('consultations_participants');
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::create('consultations_participants', function (Blueprint $table) {
$table->id();
$table->bigInteger('consultation_id')->unsigned()->index();
$table->bigInteger('user_id')->unsigned()->nullable();
$table->string('status')->default(ConsultationParticipantStatusEnum::DISCONNECTED);
$table->timestamps();

$table->foreign('user_id')->references('id')->on('users')->onDelete('SET NULL');
$table->foreign('consultation_id')->references('id')->on('consultations')->onDelete('CASCADE');
});
}
}
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<php>
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
<env name="DB_CONNECTION" value="pgsql"/>
<env name="DB_HOST" value="127.0.0.1"/>
<env name="DB_HOST" value="postgres"/>
<env name="DB_PORT" value="5432"/>
<env name="DB_DATABASE" value="default"/>
<env name="DB_USERNAME" value="default"/>
Expand Down
2 changes: 2 additions & 0 deletions src/EscolaLmsConsultationsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use EscolaLms\Consultations\Repositories\Contracts\ConsultationTermsRepositoryContract;
use EscolaLms\Consultations\Services\ConsultationService;
use EscolaLms\Consultations\Services\Contracts\ConsultationServiceContract;
use EscolaLms\Courses\Providers\SettingsServiceProvider;
use EscolaLms\Jitsi\EscolaLmsJitsiServiceProvider;
use Illuminate\Support\ServiceProvider;

Expand Down Expand Up @@ -48,5 +49,6 @@ public function register()
$this->mergeConfigFrom(__DIR__ . '/config.php', 'escolalms_consultations');
$this->app->register(AuthServiceProvider::class);
$this->app->register(EscolaLmsJitsiServiceProvider::class);
$this->app->register(SettingsServiceProvider::class);
}
}
3 changes: 2 additions & 1 deletion testbench.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
env:
- DB_CONNECTION=pgsql
- DB_HOST=127.0.0.1
- DB_HOST=postgres
- DB_PORT=5432
- DB_DATABASE=default
- DB_USERNAME=default
Expand All @@ -11,3 +11,4 @@ providers:
- Spatie\Permission\PermissionServiceProvider
- EscolaLms\Core\EscolaLmsServiceProvider
- EscolaLms\Consultations\EscolaLmsConsultationsServiceProvider
- EscolaLms\Settings\EscolaLmsSettingsServiceProvider

0 comments on commit 2cc4f3f

Please sign in to comment.