diff --git a/identity/handler.go b/identity/handler.go index 8622a2e76d8e..00f4a011e8d0 100644 --- a/identity/handler.go +++ b/identity/handler.go @@ -896,18 +896,18 @@ func (h *Handler) patch(w http.ResponseWriter, r *http.Request, ps httprouter.Pa patchedIdentity.StateChangedAt = &stateChangedAt } - updatedIdenty := Identity(patchedIdentity) + updatedIdentity := Identity(patchedIdentity) if err := h.r.IdentityManager().Update( r.Context(), - &updatedIdenty, + &updatedIdentity, ManagerAllowWriteProtectedTraits, ); err != nil { h.r.Writer().WriteError(w, r, err) return } - h.r.Writer().Write(w, r, WithCredentialsMetadataAndAdminMetadataInJSON(updatedIdenty)) + h.r.Writer().Write(w, r, WithCredentialsMetadataAndAdminMetadataInJSON(updatedIdentity)) } func deletCredentialWebAuthFromIdentity(identity *Identity) (*Identity, error) { diff --git a/package-lock.json b/package-lock.json index 8f860f034e72..705526d800d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,7 +4,6 @@ "requires": true, "packages": { "": { - "name": "kratos", "dependencies": { "@openapitools/openapi-generator-cli": "2.7.0", "yamljs": "0.3.0" diff --git a/session/handler.go b/session/handler.go index 3d9d0787404f..73ac5c32ec1b 100644 --- a/session/handler.go +++ b/session/handler.go @@ -338,11 +338,19 @@ type listSessionsRequest struct { // If no value is provided, the expandable properties are skipped. // // required: false - // enum: identity,devices // in: query - ExpandOptions []string `json:"expand"` + ExpandOptions []ListSessionExpandable `json:"expand"` } +// Expandable properties of a session +// swagger:enum ListSessionExpandable +type ListSessionExpandable string + +const ( + ListSessionExpandableIdentity ListSessionExpandable = "identity" + ListSessionExpandableDevices ListSessionExpandable = "devices" +) + // Session List Response // // The response given when listing sessions in an administrative context. diff --git a/spec/api.json b/spec/api.json index 76036e26595f..5155b2e37554 100644 --- a/spec/api.json +++ b/spec/api.json @@ -4785,11 +4785,11 @@ "in": "query", "name": "expand", "schema": { - "enum": [ - "identity", - "devices" - ], "items": { + "enum": [ + "identity", + "devices" + ], "type": "string" }, "type": "array" diff --git a/spec/swagger.json b/spec/swagger.json index 7da943e9f0a8..1f5ce08e8d29 100755 --- a/spec/swagger.json +++ b/spec/swagger.json @@ -1039,12 +1039,12 @@ "in": "query" }, { - "enum": [ - "identity", - "devices" - ], "type": "array", "items": { + "enum": [ + "identity", + "devices" + ], "type": "string" }, "description": "ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session.\nIf no value is provided, the expandable properties are skipped.", @@ -3251,9 +3251,9 @@ "title": "JSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger." }, "NullTime": { - "description": "NullTime implements the Scanner interface so\nit can be used as a scan destination, similar to NullString.", + "description": "NullTime implements the [Scanner] interface so\nit can be used as a scan destination, similar to [NullString].", "type": "object", - "title": "NullTime represents a time.Time that may be null.", + "title": "NullTime represents a [time.Time] that may be null.", "properties": { "Time": { "type": "string",