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

Bug gii/api generated rules: email_id #159

Closed
siggi-k opened this issue Jan 22, 2024 · 1 comment · Fixed by SOHELAHMED7/yii2-openapi#39
Closed

Bug gii/api generated rules: email_id #159

siggi-k opened this issue Jan 22, 2024 · 1 comment · Fixed by SOHELAHMED7/yii2-openapi#39

Comments

@siggi-k
Copy link
Contributor

siggi-k commented Jan 22, 2024

initial

  • MariaDB
  • "schema.yaml"
    In my table there is a reference to another table which has the word "mail".

mail_schema

reproduction steps

  • execute ./yii gii/api to generate code and update model

bug

  • For the automatically generated rules, this attribute is checked to ensure that it is a valid email.
    The check is incorrect mainly because it is a reference to the primaryKey from another table. It is therefore clearly an integer and obviously cannot be validated for email

mail_rule

@siggi-k siggi-k changed the title rules bug generated: email_id gii/api generated rules bug: email_id Jan 22, 2024
@siggi-k siggi-k changed the title gii/api generated rules bug: email_id Bug gii/api generated rules: email_id Feb 5, 2024
@siggi-k
Copy link
Contributor Author

siggi-k commented Feb 7, 2024

Update

Another usecase

I have several emails that I would like to save as json.

         emails:
           type: array
           x-db-type: json
           default: '{}'

No validation for email suitability is allowed here.

SOHELAHMED7 added a commit to SOHELAHMED7/yii2-openapi that referenced this issue May 30, 2024
…s-emailid

Resolve: Bug gii/api generated rules: email_id cebe#159
@cebe cebe closed this as completed in ed97a31 Jun 4, 2024
cebe added a commit that referenced this issue Jun 4, 2024
| Fix Issue # | Fork PR # |
| ------ | ------ |
| #175 | SOHELAHMED7#36 |
| #172 | SOHELAHMED7#37 |
| #159  | SOHELAHMED7#39 |
| #158 | SOHELAHMED7#40 |
| #178 |
SOHELAHMED7#41 |
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant