Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Generate only API stuffs, Do not touch database: Possible? #98

Closed
mtangoo opened this issue Feb 21, 2022 · 3 comments · Fixed by SOHELAHMED7/yii2-openapi#16 or #136
Closed

Generate only API stuffs, Do not touch database: Possible? #98

mtangoo opened this issue Feb 21, 2022 · 3 comments · Fixed by SOHELAHMED7/yii2-openapi#16 or #136
Milestone

Comments

@mtangoo
Copy link

mtangoo commented Feb 21, 2022

Hi,
Can I generate only API stuffs using an existing database?
I would hand craft OpenAPI spec but if the module can generate template OA spec will be also nice.
I just do not want this module to change my database.

Is it possible?

@cebe
Copy link
Owner

cebe commented Feb 24, 2022

yes, you can configure generator property generateMigrations to be false:

/**
* @var bool whether to generate database migrations.
*/
public $generateMigrations = true;

@mtangoo
Copy link
Author

mtangoo commented Feb 25, 2022

Thanks @cebe

@mtangoo mtangoo closed this as completed Feb 25, 2022
@cebe cebe added this to the 2.0 milestone Feb 28, 2022
@cebe cebe reopened this Feb 28, 2022
@cebe
Copy link
Owner

cebe commented Feb 28, 2022

there should be some documentation about this.

@cebe cebe moved this to 🆕 New in yii2-openapi Project Jan 27, 2023
@cebe cebe moved this from 🆕 New to 📋 Backlog in yii2-openapi Project Jan 27, 2023
@cebe cebe moved this from 📋 Backlog to 🔖 Ready in yii2-openapi Project Jan 27, 2023
SOHELAHMED7 added a commit to SOHELAHMED7/yii2-openapi that referenced this issue Jan 31, 2023
SOHELAHMED7 added a commit to SOHELAHMED7/yii2-openapi that referenced this issue Jan 31, 2023
…o-not-touch-database

Add docs to setup this project locally + for cebe#98 + enhance docs
@cebe cebe closed this as completed in #136 Mar 7, 2023
cebe added a commit that referenced this issue Mar 7, 2023
 - Add docs to setup this project locally + fix #98 + enhance docs
- Enhance all code generation for x-db-type
#119 . E.g. x-db-type should
be reflected in model validation rules() + faker and other place where
relevant. PR: SOHELAHMED7#17
 - SOHELAHMED7#15
@github-project-automation github-project-automation bot moved this from 🔖 Ready to ✅ Done in yii2-openapi Project Mar 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
2 participants