Download lib/plausible_web/plugins/api/schemas/goal/create_request.ex from Leon4gr45/analytics: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/spaces/Leon4gr45/analytics/resolve/main/lib/plausible_web/plugins/api/schemas/goal/create_request.ex
- Command line
-
hf download hf://spaces/Leon4gr45/analytics/lib/plausible_web/plugins/api/schemas/goal/create_request.ex
-
curl -L -o create_request.ex https://huggingface.co/spaces/Leon4gr45/analytics/resolve/main/lib/plausible_web/plugins/api/schemas/goal/create_request.ex
1.06 kB
| defmodule PlausibleWeb.Plugins.API.Schemas.Goal.CreateRequest do | |
| @moduledoc """ | |
| OpenAPI schema for Goal creation request | |
| """ | |
| use Plausible.Funnel.Const | |
| use PlausibleWeb, :open_api_schema | |
| OpenApiSpex.schema(%{ | |
| title: "Goal.CreateRequest", | |
| description: "Goal creation params", | |
| type: :object, | |
| oneOf: [ | |
| %Schema{ | |
| title: "Goal.CreateRequest.BulkGetOrCreate", | |
| type: :object, | |
| description: "Bulk goal creation request", | |
| required: [:goals], | |
| properties: %{ | |
| goals: %Schema{ | |
| type: :array, | |
| minItems: 1, | |
| maxItems: Funnel.Const.max_steps(), | |
| items: %Schema{ | |
| oneOf: [ | |
| Schemas.Goal.CreateRequest.CustomEvent, | |
| Schemas.Goal.CreateRequest.Revenue, | |
| Schemas.Goal.CreateRequest.Pageview | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| Schemas.Goal.CreateRequest.CustomEvent, | |
| Schemas.Goal.CreateRequest.Revenue, | |
| Schemas.Goal.CreateRequest.Pageview | |
| ] | |
| }) | |
| end | |