migrate to per-model UUID Primary key, remove UUIDModel (#26)

* *: migrate to per-model UUID Primary key, remove UUIDModel

* *: fix import order, fix unittests
This commit is contained in:
Jens L
2020-05-20 09:17:06 +02:00
committed by GitHub
parent 13a20478fd
commit 24a3e787dd
104 changed files with 671 additions and 2189 deletions

View File

@ -68,7 +68,7 @@ paths:
tags:
- audit
parameters: []
/audit/events/{uuid}/:
/audit/events/{event_uuid}/:
get:
operationId: audit_events_read
description: Event Read-Only Viewset
@ -81,7 +81,7 @@ paths:
tags:
- audit
parameters:
- name: uuid
- name: event_uuid
in: path
description: A UUID string identifying this Audit Event.
required: true
@ -154,7 +154,7 @@ paths:
tags:
- core
parameters: []
/core/applications/{id}/:
/core/applications/{pbm_uuid}/:
get:
operationId: core_applications_read
description: Application Viewset
@ -208,11 +208,12 @@ paths:
tags:
- core
parameters:
- name: id
- name: pbm_uuid
in: path
description: A unique integer value identifying this application.
description: A UUID string identifying this application.
required: true
type: integer
type: string
format: uuid
/core/groups/:
get:
operationId: core_groups_list
@ -280,7 +281,7 @@ paths:
tags:
- core
parameters: []
/core/groups/{uuid}/:
/core/groups/{group_uuid}/:
get:
operationId: core_groups_read
description: Group Viewset
@ -334,7 +335,7 @@ paths:
tags:
- core
parameters:
- name: uuid
- name: group_uuid
in: path
description: A UUID string identifying this group.
required: true
@ -471,7 +472,7 @@ paths:
operationId: flows_bindings_list
description: FlowStageBinding Viewset
parameters:
- name: uuid
- name: pbm_uuid
in: query
description: ''
required: false
@ -481,6 +482,11 @@ paths:
description: ''
required: false
type: string
- name: fsb_uuid
in: query
description: ''
required: false
type: string
- name: flow
in: query
description: ''
@ -563,7 +569,7 @@ paths:
tags:
- flows
parameters: []
/flows/bindings/{uuid}/:
/flows/bindings/{fsb_uuid}/:
get:
operationId: flows_bindings_read
description: FlowStageBinding Viewset
@ -617,7 +623,7 @@ paths:
tags:
- flows
parameters:
- name: uuid
- name: fsb_uuid
in: path
description: A UUID string identifying this Flow Stage Binding.
required: true
@ -690,7 +696,7 @@ paths:
tags:
- flows
parameters: []
/flows/instances/{uuid}/:
/flows/instances/{flow_uuid}/:
get:
operationId: flows_instances_read
description: Flow Viewset
@ -744,7 +750,7 @@ paths:
tags:
- flows
parameters:
- name: uuid
- name: flow_uuid
in: path
description: A UUID string identifying this Flow.
required: true
@ -801,7 +807,7 @@ paths:
tags:
- policies
parameters: []
/policies/all/{uuid}/:
/policies/all/{policy_uuid}/:
get:
operationId: policies_all_read
description: Policy Viewset
@ -814,7 +820,7 @@ paths:
tags:
- policies
parameters:
- name: uuid
- name: policy_uuid
in: path
description: A UUID string identifying this policy.
required: true
@ -887,7 +893,7 @@ paths:
tags:
- policies
parameters: []
/policies/bindings/{uuid}/:
/policies/bindings/{policy_binding_uuid}/:
get:
operationId: policies_bindings_read
description: PolicyBinding Viewset
@ -941,7 +947,7 @@ paths:
tags:
- policies
parameters:
- name: uuid
- name: policy_binding_uuid
in: path
description: A UUID string identifying this Policy Binding.
required: true
@ -1014,7 +1020,7 @@ paths:
tags:
- policies
parameters: []
/policies/dummy/{uuid}/:
/policies/dummy/{policy_uuid}/:
get:
operationId: policies_dummy_read
description: Dummy Viewset
@ -1068,7 +1074,7 @@ paths:
tags:
- policies
parameters:
- name: uuid
- name: policy_uuid
in: path
description: A UUID string identifying this Dummy Policy.
required: true
@ -1141,7 +1147,7 @@ paths:
tags:
- policies
parameters: []
/policies/expression/{uuid}/:
/policies/expression/{policy_uuid}/:
get:
operationId: policies_expression_read
description: Source Viewset
@ -1195,7 +1201,7 @@ paths:
tags:
- policies
parameters:
- name: uuid
- name: policy_uuid
in: path
description: A UUID string identifying this Expression Policy.
required: true
@ -1268,7 +1274,7 @@ paths:
tags:
- policies
parameters: []
/policies/haveibeenpwned/{uuid}/:
/policies/haveibeenpwned/{policy_uuid}/:
get:
operationId: policies_haveibeenpwned_read
description: Source Viewset
@ -1322,7 +1328,7 @@ paths:
tags:
- policies
parameters:
- name: uuid
- name: policy_uuid
in: path
description: A UUID string identifying this Have I Been Pwned Policy.
required: true
@ -1395,7 +1401,7 @@ paths:
tags:
- policies
parameters: []
/policies/password/{uuid}/:
/policies/password/{policy_uuid}/:
get:
operationId: policies_password_read
description: Source Viewset
@ -1449,7 +1455,7 @@ paths:
tags:
- policies
parameters:
- name: uuid
- name: policy_uuid
in: path
description: A UUID string identifying this Password Policy.
required: true
@ -1522,7 +1528,7 @@ paths:
tags:
- policies
parameters: []
/policies/passwordexpiry/{uuid}/:
/policies/passwordexpiry/{policy_uuid}/:
get:
operationId: policies_passwordexpiry_read
description: Password Expiry Viewset
@ -1576,7 +1582,7 @@ paths:
tags:
- policies
parameters:
- name: uuid
- name: policy_uuid
in: path
description: A UUID string identifying this Password Expiry Policy.
required: true
@ -1649,7 +1655,7 @@ paths:
tags:
- policies
parameters: []
/policies/reputation/{uuid}/:
/policies/reputation/{policy_uuid}/:
get:
operationId: policies_reputation_read
description: Source Viewset
@ -1703,7 +1709,7 @@ paths:
tags:
- policies
parameters:
- name: uuid
- name: policy_uuid
in: path
description: A UUID string identifying this Reputation Policy.
required: true
@ -1760,7 +1766,7 @@ paths:
tags:
- propertymappings
parameters: []
/propertymappings/all/{uuid}/:
/propertymappings/all/{pm_uuid}/:
get:
operationId: propertymappings_all_read
description: PropertyMapping Viewset
@ -1773,7 +1779,7 @@ paths:
tags:
- propertymappings
parameters:
- name: uuid
- name: pm_uuid
in: path
description: A UUID string identifying this Property Mapping.
required: true
@ -1846,7 +1852,7 @@ paths:
tags:
- propertymappings
parameters: []
/propertymappings/ldap/{uuid}/:
/propertymappings/ldap/{pm_uuid}/:
get:
operationId: propertymappings_ldap_read
description: LDAP PropertyMapping Viewset
@ -1900,7 +1906,7 @@ paths:
tags:
- propertymappings
parameters:
- name: uuid
- name: pm_uuid
in: path
description: A UUID string identifying this LDAP Property Mapping.
required: true
@ -1973,7 +1979,7 @@ paths:
tags:
- propertymappings
parameters: []
/propertymappings/saml/{uuid}/:
/propertymappings/saml/{pm_uuid}/:
get:
operationId: propertymappings_saml_read
description: SAMLPropertyMapping Viewset
@ -2027,7 +2033,7 @@ paths:
tags:
- propertymappings
parameters:
- name: uuid
- name: pm_uuid
in: path
description: A UUID string identifying this SAML Property Mapping.
required: true
@ -2657,7 +2663,7 @@ paths:
tags:
- sources
parameters: []
/sources/all/{id}/:
/sources/all/{pbm_uuid}/:
get:
operationId: sources_all_read
description: Source Viewset
@ -2670,11 +2676,12 @@ paths:
tags:
- sources
parameters:
- name: id
- name: pbm_uuid
in: path
description: A unique integer value identifying this source.
description: A UUID string identifying this source.
required: true
type: integer
type: string
format: uuid
/sources/ldap/:
get:
operationId: sources_ldap_list
@ -2742,7 +2749,7 @@ paths:
tags:
- sources
parameters: []
/sources/ldap/{id}/:
/sources/ldap/{pbm_uuid}/:
get:
operationId: sources_ldap_read
description: LDAP Source Viewset
@ -2796,11 +2803,12 @@ paths:
tags:
- sources
parameters:
- name: id
- name: pbm_uuid
in: path
description: A unique integer value identifying this LDAP Source.
description: A UUID string identifying this LDAP Source.
required: true
type: integer
type: string
format: uuid
/sources/oauth/:
get:
operationId: sources_oauth_list
@ -2868,7 +2876,7 @@ paths:
tags:
- sources
parameters: []
/sources/oauth/{id}/:
/sources/oauth/{pbm_uuid}/:
get:
operationId: sources_oauth_read
description: Source Viewset
@ -2922,11 +2930,12 @@ paths:
tags:
- sources
parameters:
- name: id
- name: pbm_uuid
in: path
description: A unique integer value identifying this Generic OAuth Source.
description: A UUID string identifying this Generic OAuth Source.
required: true
type: integer
type: string
format: uuid
/stages/all/:
get:
operationId: stages_all_list
@ -2978,7 +2987,7 @@ paths:
tags:
- stages
parameters: []
/stages/all/{uuid}/:
/stages/all/{stage_uuid}/:
get:
operationId: stages_all_read
description: Stage Viewset
@ -2991,7 +3000,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this stage.
required: true
@ -3064,7 +3073,7 @@ paths:
tags:
- stages
parameters: []
/stages/captcha/{uuid}/:
/stages/captcha/{stage_uuid}/:
get:
operationId: stages_captcha_read
description: CaptchaStage Viewset
@ -3118,7 +3127,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this Captcha Stage.
required: true
@ -3191,7 +3200,7 @@ paths:
tags:
- stages
parameters: []
/stages/dummy/{uuid}/:
/stages/dummy/{stage_uuid}/:
get:
operationId: stages_dummy_read
description: DummyStage Viewset
@ -3245,7 +3254,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this Dummy Stage.
required: true
@ -3318,7 +3327,7 @@ paths:
tags:
- stages
parameters: []
/stages/email/{uuid}/:
/stages/email/{stage_uuid}/:
get:
operationId: stages_email_read
description: EmailStage Viewset
@ -3372,7 +3381,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this Email Stage.
required: true
@ -3445,7 +3454,7 @@ paths:
tags:
- stages
parameters: []
/stages/identification/{uuid}/:
/stages/identification/{stage_uuid}/:
get:
operationId: stages_identification_read
description: IdentificationStage Viewset
@ -3499,7 +3508,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this Identification Stage.
required: true
@ -3639,7 +3648,7 @@ paths:
tags:
- stages
parameters: []
/stages/invitation/invitations/{uuid}/:
/stages/invitation/invitations/{invite_uuid}/:
get:
operationId: stages_invitation_invitations_read
description: Invitation Viewset
@ -3693,13 +3702,13 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: invite_uuid
in: path
description: A UUID string identifying this Invitation.
required: true
type: string
format: uuid
/stages/invitation/{uuid}/:
/stages/invitation/{stage_uuid}/:
get:
operationId: stages_invitation_read
description: InvitationStage Viewset
@ -3753,7 +3762,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this Invitation Stage.
required: true
@ -3826,7 +3835,7 @@ paths:
tags:
- stages
parameters: []
/stages/otp/{uuid}/:
/stages/otp/{stage_uuid}/:
get:
operationId: stages_otp_read
description: OTPStage Viewset
@ -3880,7 +3889,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this OTP Stage.
required: true
@ -3953,7 +3962,7 @@ paths:
tags:
- stages
parameters: []
/stages/password/{uuid}/:
/stages/password/{stage_uuid}/:
get:
operationId: stages_password_read
description: PasswordStage Viewset
@ -4007,7 +4016,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this Password Stage.
required: true
@ -4080,7 +4089,7 @@ paths:
tags:
- stages
parameters: []
/stages/prompt/prompts/{uuid}/:
/stages/prompt/prompts/{prompt_uuid}/:
get:
operationId: stages_prompt_prompts_read
description: Prompt Viewset
@ -4134,7 +4143,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: prompt_uuid
in: path
description: A UUID string identifying this Prompt.
required: true
@ -4207,7 +4216,7 @@ paths:
tags:
- stages
parameters: []
/stages/prompt/stages/{id}/:
/stages/prompt/stages/{pbm_uuid}/:
get:
operationId: stages_prompt_stages_read
description: PromptStage Viewset
@ -4261,11 +4270,12 @@ paths:
tags:
- stages
parameters:
- name: id
- name: pbm_uuid
in: path
description: A unique integer value identifying this Prompt Stage.
description: A UUID string identifying this Prompt Stage.
required: true
type: integer
type: string
format: uuid
/stages/user_delete/:
get:
operationId: stages_user_delete_list
@ -4333,7 +4343,7 @@ paths:
tags:
- stages
parameters: []
/stages/user_delete/{uuid}/:
/stages/user_delete/{stage_uuid}/:
get:
operationId: stages_user_delete_read
description: UserDeleteStage Viewset
@ -4387,7 +4397,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this User Delete Stage.
required: true
@ -4460,7 +4470,7 @@ paths:
tags:
- stages
parameters: []
/stages/user_login/{uuid}/:
/stages/user_login/{stage_uuid}/:
get:
operationId: stages_user_login_read
description: UserLoginStage Viewset
@ -4514,7 +4524,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this User Login Stage.
required: true
@ -4587,7 +4597,7 @@ paths:
tags:
- stages
parameters: []
/stages/user_logout/{uuid}/:
/stages/user_logout/{stage_uuid}/:
get:
operationId: stages_user_logout_read
description: UserLogoutStage Viewset
@ -4641,7 +4651,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this User Logout Stage.
required: true
@ -4714,7 +4724,7 @@ paths:
tags:
- stages
parameters: []
/stages/user_write/{uuid}/:
/stages/user_write/{stage_uuid}/:
get:
operationId: stages_user_write_read
description: UserWriteStage Viewset
@ -4768,7 +4778,7 @@ paths:
tags:
- stages
parameters:
- name: uuid
- name: stage_uuid
in: path
description: A UUID string identifying this User Write Stage.
required: true
@ -4782,7 +4792,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Event uuid
type: string
format: uuid
readOnly: true
@ -4833,8 +4843,9 @@ definitions:
type: object
properties:
pk:
title: ID
type: integer
title: Pbm uuid
type: string
format: uuid
readOnly: true
name:
title: Name
@ -4873,7 +4884,8 @@ definitions:
policies:
type: array
items:
type: integer
type: string
format: uuid
readOnly: true
uniqueItems: true
Group:
@ -4884,7 +4896,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Group uuid
type: string
format: uuid
readOnly: true
@ -4941,7 +4953,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Fsb uuid
type: string
format: uuid
readOnly: true
@ -4966,7 +4978,8 @@ definitions:
policies:
type: array
items:
type: integer
type: string
format: uuid
readOnly: true
uniqueItems: true
Flow:
@ -4977,7 +4990,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Flow uuid
type: string
format: uuid
readOnly: true
@ -5012,14 +5025,15 @@ definitions:
policies:
type: array
items:
type: integer
type: string
format: uuid
readOnly: true
uniqueItems: true
Policy:
type: object
properties:
pk:
title: Uuid
title: Policy uuid
type: string
format: uuid
readOnly: true
@ -5056,7 +5070,8 @@ definitions:
format: uuid
target:
title: Target
type: integer
type: string
format: uuid
enabled:
title: Enabled
type: boolean
@ -5069,7 +5084,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Policy uuid
type: string
format: uuid
readOnly: true
@ -5109,7 +5124,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Policy uuid
type: string
format: uuid
readOnly: true
@ -5138,7 +5153,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Policy uuid
type: string
format: uuid
readOnly: true
@ -5170,7 +5185,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Policy uuid
type: string
format: uuid
readOnly: true
@ -5225,7 +5240,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Policy uuid
type: string
format: uuid
readOnly: true
@ -5258,7 +5273,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Policy uuid
type: string
format: uuid
readOnly: true
@ -5297,7 +5312,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Pm uuid
type: string
format: uuid
readOnly: true
@ -5321,7 +5336,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Pm uuid
type: string
format: uuid
readOnly: true
@ -5345,7 +5360,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Pm uuid
type: string
format: uuid
readOnly: true
@ -5605,8 +5620,9 @@ definitions:
type: object
properties:
pk:
title: ID
type: integer
title: Pbm uuid
type: string
format: uuid
readOnly: true
name:
title: Name
@ -5641,8 +5657,9 @@ definitions:
type: object
properties:
pk:
title: ID
type: integer
title: Pbm uuid
type: string
format: uuid
readOnly: true
name:
title: Name
@ -5736,8 +5753,9 @@ definitions:
type: object
properties:
pk:
title: ID
type: integer
title: Pbm uuid
type: string
format: uuid
readOnly: true
name:
title: Name
@ -5793,7 +5811,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true
@ -5817,7 +5835,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true
@ -5841,7 +5859,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true
@ -5855,7 +5873,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true
@ -5919,7 +5937,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true
@ -5948,7 +5966,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true
@ -5966,7 +5984,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Invite uuid
type: string
format: uuid
readOnly: true
@ -5984,7 +6002,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true
@ -6003,7 +6021,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true
@ -6027,7 +6045,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Prompt uuid
type: string
format: uuid
readOnly: true
@ -6066,8 +6084,9 @@ definitions:
type: object
properties:
pk:
title: ID
type: integer
title: Pbm uuid
type: string
format: uuid
readOnly: true
name:
title: Name
@ -6085,7 +6104,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true
@ -6099,7 +6118,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true
@ -6113,7 +6132,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true
@ -6127,7 +6146,7 @@ definitions:
type: object
properties:
pk:
title: Uuid
title: Stage uuid
type: string
format: uuid
readOnly: true