# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). # https://openapi-generator.tech # Do not edit the class manually. defmodule Ory.Api.Syntax do @moduledoc """ API calls for all endpoints tagged `Syntax`. """ alias Ory.Connection import Ory.RequestBuilder @doc """ Check the syntax of an OPL file The OPL file is expected in the body of the request. ## Parameters - connection (Ory.Connection): Connection to server - body (String.t): the OPL content to check - opts (KeywordList): [optional] Optional parameters ## Returns {:ok, Ory.Model.PostCheckOplSyntaxResponse.t} on success {:error, Tesla.Env.t} on failure """ @spec check_opl_syntax(Tesla.Env.client, String.t, keyword()) :: {:ok, Ory.Model.PostCheckOplSyntaxResponse.t} | {:ok, Ory.Model.GenericError.t} | {:error, Tesla.Env.t} def check_opl_syntax(connection, body, _opts \\ []) do %{} |> method(:post) |> url("/opl/syntax/check") |> add_param(:body, :body, body) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> evaluate_response([ { 200, %Ory.Model.PostCheckOplSyntaxResponse{}}, { 400, %Ory.Model.GenericError{}}, { 500, %Ory.Model.GenericError{}} ]) end end