Skip to content

Commit

Permalink
Fix wrong schema
Browse files Browse the repository at this point in the history
  • Loading branch information
d-yoshi committed May 13, 2024
1 parent 6ee1aba commit e7e8890
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 8 deletions.
59 changes: 59 additions & 0 deletions src/components/schemas/project.simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
type: object
required:
- id
- name
- identifier
- description
- status
- is_public
- inherit_members
- created_on
- updated_on
properties:
id:
type: integer
name:
type: string
identifier:
type: string
description:
type: string
nullable: true
parent:
$ref: ./id_name.yml
status:
type: integer
is_public:
type: boolean
inherit_members:
type: boolean
custom_fields:
type: array
items:
$ref: ./custom_field_value.yml
trackers:
type: array
items:
$ref: ./id_name.yml
issue_categories:
type: array
items:
$ref: ./id_name.yml
time_entry_activities:
type: array
items:
$ref: ./id_name.yml
enabled_modules:
type: array
items:
$ref: ./id_name.yml
issue_custom_fields:
type: array
items:
$ref: ./id_name.yml
created_on:
type: string
format: date-time
updated_on:
type: string
format: date-time
12 changes: 8 additions & 4 deletions src/components/schemas/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@ properties:
homepage:
type: string
nullable: true
parent_id:
type: integer
parent:
$ref: ./id_name.yml
status:
type: integer
is_public:
type: boolean
inherit_members:
type: boolean
default_version:
$ref: ./id_name.yml
default_assignee:
$ref: ./id_name.yml
custom_fields:
type: array
items:
Expand All @@ -42,11 +46,11 @@ properties:
type: array
items:
$ref: ./id_name.yml
enabled_modules:
time_entry_activities:
type: array
items:
$ref: ./id_name.yml
time_entry_activities:
enabled_modules:
type: array
items:
$ref: ./id_name.yml
Expand Down
2 changes: 1 addition & 1 deletion src/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ info:
license:
name: MIT
url: https://github.com/d-yoshi/redmine-openapi/blob/main/LICENSE
version: 0.13.5
version: 0.14.0

servers:
- url: /
Expand Down
7 changes: 6 additions & 1 deletion src/paths/projects.project_id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ get:
enum:
- trackers
- issue_categories
- enabled_modules
- time_entry_activities
- enabled_modules
- issue_custom_fields
explode: false
responses:
Expand Down Expand Up @@ -59,18 +59,23 @@ put:
type: string
description:
type: string
nullable: true
homepage:
type: string
nullable: true
is_public:
type: boolean
parent_id:
type: integer
nullable: true
inherit_members:
type: boolean
default_assigned_to_id:
type: integer
nullable: true
default_version_id:
type: integer
nullable: true
tracker_ids:
type: array
items:
Expand Down
7 changes: 5 additions & 2 deletions src/paths/projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ get:
enum:
- trackers
- issue_categories
- enabled_modules
- time_entry_activities
- enabled_modules
- issue_custom_fields
explode: false
responses:
Expand All @@ -38,7 +38,7 @@ get:
projects:
type: array
items:
$ref: ../components/schemas/project.yml
$ref: ../components/schemas/project.simple.yml
total_count:
type: integer
offset:
Expand Down Expand Up @@ -84,12 +84,15 @@ post:
type: boolean
parent_id:
type: integer
nullable: true
inherit_members:
type: boolean
default_assigned_to_id:
type: integer
nullable: true
default_version_id:
type: integer
nullable: true
tracker_ids:
type: array
items:
Expand Down

0 comments on commit e7e8890

Please sign in to comment.