swagger bugfix

This commit is contained in:
zgdxiaoxiao 2016-09-21 10:43:04 +08:00
parent 40858761d8
commit bfb5db7c97
6 changed files with 33 additions and 41 deletions

View File

@ -881,7 +881,7 @@ paths:
schema:
type: array
items:
$ref: '#/definitions/JobStatus'
$ref: '#/definitions/RepPolicy'
headers:
X-Total-Count:
description: The total count of jobs
@ -1211,9 +1211,7 @@ paths:
200:
description: Get replication's target successfully.
schema:
type: array
items:
$ref: '#/definitions/RepTarget'
$ref: '#/definitions/RepTarget'
401:
description: User need to log in first.
404:
@ -1302,18 +1300,18 @@ definitions:
SearchRepository:
type: object
properties:
repository_name:
type: string
description: The name of the repository
project_name:
type: string
description: The name of the project that the repository belongs to
project_id:
type: integer
description: The ID of the project that the repository belongs to
project_name:
type: string
description: The name of the project that the repository belongs to
project_public:
type: integer
description: The flag to indicate the publicity of the project that the repository belongs to (1 is public, 0 is not)
repository_name:
type: string
description: The name of the repository
ProjectReq:
type: object
properties:
@ -1348,10 +1346,6 @@ definitions:
type: integer
format: int32
description: A deletion mark of the project (1 means it's deleted, 0 is not)
user_id:
type: integer
format: int32
description: A relation field to the user table.
owner_name:
type: string
description: The owner name of the project.
@ -1359,7 +1353,7 @@ definitions:
type: integer
format: int
description: The public status of the project.
togglable:
Togglable:
type: boolean
description: Correspond to the UI about whether the project's publicity is updatable (for UI)
current_user_role_id:
@ -1470,6 +1464,8 @@ definitions:
role_name:
type: string
description: Name the the role.
role_mask:
type: string
RoleParam:
type: object
properties:
@ -1488,7 +1484,7 @@ definitions:
repo_name:
type: string
description: The name of the repo
access_count:
count:
type: integer
format: int
description: The access count of the repo
@ -1574,9 +1570,6 @@ definitions:
type: integer
format: int64
description: The target ID.
target_name:
type: string
description: The target name.
name:
type: string
description: The policy name.
@ -1602,6 +1595,8 @@ definitions:
error_job_count:
format: int
description: The error job count number for the policy.
deleted:
type: integer
RepPolicyPost:
type: object
properties:
@ -1687,4 +1682,3 @@ definitions:
password:
type: string
description: The target server password.

View File

@ -42,9 +42,6 @@ type Project struct {
// A deletion mark of the project (1 means it's deleted, 0 is not)
Deleted int32 `json:"deleted,omitempty"`
// A relation field to the user table.
UserId int32 `json:"user_id,omitempty"`
// The owner name of the project.
OwnerName string `json:"owner_name,omitempty"`
@ -52,7 +49,7 @@ type Project struct {
Public int32 `json:"public,omitempty"`
// Correspond to the UI about whether the project's publicity is updatable (for UI)
Togglable bool `json:"togglable,omitempty"`
Togglable bool `json:"Togglable,omitempty"`
// The role ID of the current user who triggered the API (for UI)
CurrentUserRoleId int32 `json:"current_user_role_id,omitempty"`

View File

@ -1,10 +1,10 @@
/*
/*
* Harbor API
*
* These APIs provide services for manipulating Harbor project.
*
* OpenAPI spec version: 0.3.0
*
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -36,9 +36,6 @@ type RepPolicy struct {
// The target ID.
TargetId int64 `json:"target_id,omitempty"`
// The target name.
TargetName string `json:"target_name,omitempty"`
// The policy name.
Name string `json:"name,omitempty"`
@ -59,4 +56,6 @@ type RepPolicy struct {
// The update time of the policy.
UpdateTime string `json:"update_time,omitempty"`
Deleted int32 `json:"deleted,omitempty"`
}

View File

@ -1,10 +1,10 @@
/*
/*
* Harbor API
*
* These APIs provide services for manipulating Harbor project.
*
* OpenAPI spec version: 0.3.0
*
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -32,4 +32,6 @@ type Role struct {
// Name the the role.
RoleName string `json:"role_name,omitempty"`
RoleMask string `json:"role_mask,omitempty"`
}

View File

@ -1,10 +1,10 @@
/*
/*
* Harbor API
*
* These APIs provide services for manipulating Harbor project.
*
* OpenAPI spec version: 0.3.0
*
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -24,15 +24,15 @@ package apilib
type SearchRepository struct {
// The name of the repository
RepositoryName string `json:"repository_name,omitempty"`
// The ID of the project that the repository belongs to
ProjectId int32 `json:"project_id,omitempty"`
// The name of the project that the repository belongs to
ProjectName string `json:"project_name,omitempty"`
// The ID of the project that the repository belongs to
ProjectId int32 `json:"project_id,omitempty"`
// The flag to indicate the publicity of the project that the repository belongs to (1 is public, 0 is not)
ProjectPublic int32 `json:"project_public,omitempty"`
// The name of the repository
RepositoryName string `json:"repository_name,omitempty"`
}

View File

@ -1,10 +1,10 @@
/*
/*
* Harbor API
*
* These APIs provide services for manipulating Harbor project.
*
* OpenAPI spec version: 0.3.0
*
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -28,5 +28,5 @@ type TopRepo struct {
RepoName string `json:"repo_name,omitempty"`
// The access count of the repo
AccessCount int32 `json:"access_count,omitempty"`
Count int32 `json:"count,omitempty"`
}