Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
nikromen committed Nov 19, 2023
1 parent fe32d34 commit 1e8affc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@
from coprs.views.apiv3_ns import rename_fields_helper, api
from coprs.views.apiv3_ns.schema.schemas import (
project_model,
project_get_input_model,
project_get_list_input_model,
project_add_input_model,
project_edit_input_model,
project_fork_input_model,
project_delete_input_model,
project_regenerate_repos_input_model,
)
from coprs.views.apiv3_ns.schema.docs import fullname_docs, ownername_docs, query_docs
from coprs.logic.actions_logic import ActionsLogic
Expand Down Expand Up @@ -104,7 +101,6 @@ def owner2tuple(ownername):
class Project(Resource):
@apiv3_projects_ns.doc(fullname_docs)
@apiv3_projects_ns.marshal_with(project_model)
@apiv3_projects_ns.expect(project_get_input_model)
@apiv3_projects_ns.response(HTTPStatus.OK.value, "OK, Project data follows...")
@apiv3_projects_ns.response(
HTTPStatus.NOT_FOUND.value, "No such Copr project found in database"
Expand All @@ -125,7 +121,6 @@ def get(self):
class ProjectList(Resource):
@restx_pagination
@apiv3_projects_ns.doc(ownername_docs)
@apiv3_projects_ns.expect(project_get_list_input_model)
@apiv3_projects_ns.marshal_list_with(project_model)
@apiv3_projects_ns.response(
HTTPStatus.PARTIAL_CONTENT.value, HTTPStatus.PARTIAL_CONTENT.description
Expand All @@ -147,7 +142,6 @@ def get(self, ownername=None, **kwargs):
class ProjectSearch(Resource):
@restx_pagination
@apiv3_projects_ns.doc(query_docs)
@apiv3_projects_ns.expect(project_get_list_input_model)
@apiv3_projects_ns.marshal_list_with(project_model)
@apiv3_projects_ns.response(
HTTPStatus.PARTIAL_CONTENT.value, HTTPStatus.PARTIAL_CONTENT.description
Expand Down Expand Up @@ -444,7 +438,6 @@ def _common(copr):
@restx_editable_copr
@apiv3_projects_ns.doc(fullname_docs)
@apiv3_projects_ns.marshal_with(project_model)
@apiv3_projects_ns.expect(project_regenerate_repos_input_model)
@apiv3_projects_ns.response(HTTPStatus.OK.value, "OK, reposirory metadata regenerated")
def put(self, copr):
"""
Expand All @@ -456,7 +449,6 @@ def put(self, copr):
@restx_editable_copr
@apiv3_projects_ns.doc(fullname_docs)
@apiv3_projects_ns.marshal_with(project_model)
@apiv3_projects_ns.expect(project_regenerate_repos_input_model)
@apiv3_projects_ns.response(HTTPStatus.OK.value, "OK, reposirory metadata regenerated")
@deprecated_route_method_type(apiv3_projects_ns, "POST", "PUT")
def post(self, copr):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,5 @@ class ProjectGet(InputSchema):
package_edit_input_model = package_add_input_model

project_chroot_get_input_model = ProjectChrootGet.get_cls().input_model()
project_get_input_model = None

project_add_input_model = None

0 comments on commit 1e8affc

Please sign in to comment.