Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Разобраться, почему не генерируются нормально модели для списков #266

Closed
prt0117 opened this issue Aug 7, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@prt0117
Copy link
Contributor

prt0117 commented Aug 7, 2024

image

найдена проблема.
генератор не сгенерировал внутрянку модели UserInfos.

при этом описание ручки:

get:
  summary: List of users
  operationId: handler-user-list-get
...
  parameters:
...
  responses:
    '200':
      $ref: ../components/responses/UserInfos.yaml
...

В этом респонсе у нас:

description: A paged array of projects
content:
  application/json:
    schema:
      $ref: ../schemas/UserInfos.yaml

В схеме $ref: ../schemas/UserInfos.yaml:

type: array
maxItems: 100
items:
  $ref: ./UserInfo.yaml

Схема для одной сущности UserInfo:

type: object
required:
  - displayName
  - login
  - firstname
  - lastname
  - email
properties:
  id:
    type: string
    format: uuid
    minLength: 36
    maxLength: 36
    pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
  displayName:
    type: string
    minLength: 1
  login:
    type: string
    minLength: 1
  firstname:
    type: string
    minLength: 1
  lastname:
    type: string
    minLength: 1
  email:
    type: string
    minLength: 1

То же самое для всех остальных множественных моделей - sections, translations и т.д.

@prt0117 prt0117 added the bug Something isn't working label Aug 7, 2024
@prt0117 prt0117 added this to the Разработка milestone Aug 7, 2024
@prt0117 prt0117 self-assigned this Aug 7, 2024
@prt0117
Copy link
Contributor Author

prt0117 commented Aug 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant