Skip to content

Commit

Permalink
Temp sxclude some fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Mropat committed Apr 1, 2022
1 parent 12538d7 commit fbbe3ae
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions genotype_api/api/endpoints/samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@
response_model=SampleReadWithAnalysisDeep,
response_model_by_alias=False,
response_model_exclude={
"analyses": {"__all__": {"genotypes": True, "source": True, "created_at": True}}
"analyses": {"__all__": {"genotypes": True, "source": True, "created_at": True}},
"detail": {
"sex": True,
"nocalls": True,
"snps": True,
"matches": True,
"mismatches": True,
"unknown": True,
},
},
)
def read_sample(
Expand All @@ -64,7 +72,15 @@ def read_sample(
response_model=List[SampleReadWithAnalysisDeep],
response_model_by_alias=False,
response_model_exclude={
"analyses": {"__all__": {"genotypes": True, "source": True, "created_at": True}}
"analyses": {"__all__": {"genotypes": True, "source": True, "created_at": True}},
"detail": {
"sex": True,
"nocalls": True,
"snps": True,
"matches": True,
"mismatches": True,
"unknown": True,
},
},
)
def read_samples(
Expand Down Expand Up @@ -200,7 +216,12 @@ def match(
return match_results


@router.get("/{sample_id}/status_detail", response_model=SampleDetail)
@router.get(
"/{sample_id}/status_detail",
response_model=SampleDetail,
deprecated=True,
response_model_include={"sex": True, "nocalls": True, "snps": True},
)
def get_status_detail(
sample_id: str,
session: Session = Depends(get_session),
Expand Down

0 comments on commit fbbe3ae

Please sign in to comment.