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

Feature/accept put method to update scheduled job on root url #162

Conversation

@daltonmatos
Copy link
Member

daltonmatos commented Aug 5, 2019

Mesmo com a correção, um PUT /jobs/{job_id} ainda requer um JSON no body que contenha o campo id.

Para podermos fazer isso sem requerer o campo id teríamos que remapear todos os Resources (e sub-resources) que estão em asgard.api.resources.jobs e acho que isso é uma tarefa bem meior do que esse fix.

O campo só é obrigatório pois o handler usa o próprio model asgard.models.job.ScheduledJob.

O que tentei fazer foi mapear um novo resource assim:

class ScheduledJobUpdateResource(ScheduledJob):
  id: Optional[str]

Mas o pydantic não permite pois a baseclass do ScheduledJob declara o id como id: str.

daltonmatos added 2 commits Aug 2, 2019
@daltonmatos daltonmatos merged commit 85559d5 into feature/add-default-fetch-uri Aug 5, 2019
2 of 3 checks passed
2 of 3 checks passed
ci/circleci: py36x Your tests failed on CircleCI
Details
ci/circleci: py368 Your tests passed on CircleCI!
Details
ci/circleci: py37x Your tests passed on CircleCI!
Details
@daltonmatos daltonmatos deleted the feature/accept-put-method-to-update-scheduled-job-on-root-url branch Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.