Skip to content

Preview a server-generated Net Operation Project source template without creating a revision.

POST
/api/workspace/admin/net-operation-project/source-templates/preview
curl --request POST \
--url https://example.com/api/workspace/admin/net-operation-project/source-templates/preview \
--header 'Content-Type: application/json' \
--data '{ "TemplateId": "example", "ClassName": "example", "DisplayName": "example", "StableKey": "example", "TargetEntityDefinitionId": "example", "Folder": "example", "Path": "example", "RevisionId": "example" }'
  • None
access_token
string

Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.

Request a generated Net Operation Project source template preview.

object
TemplateId

Template identifier.

string
nullable
ClassName

Requested C# class name.

string
nullable
DisplayName

Optional user-facing function or data-source display name.

string
nullable
StableKey

Optional stable function or data-source key.

string
nullable
TargetEntityDefinitionId

Optional target Entity Definition id for entity-scoped templates.

string
nullable
Folder

Optional source folder used when Path is omitted.

string
nullable
Path

Optional explicit source path.

string
nullable
RevisionId

Optional source revision id used for collision warnings.

string
nullable
Examplegenerated
{
"TemplateId": "example",
"ClassName": "example",
"DisplayName": "example",
"StableKey": "example",
"TargetEntityDefinitionId": "example",
"Folder": "example",
"Path": "example",
"RevisionId": "example"
}

OK

Media typeapplication/json
object
Data

Generated Net Operation Project source template preview.

object
TemplateId

Template identifier.

string
nullable
ProposedPath

Normalized source path for the generated file.

string
nullable
Content

Generated C# source content.

string
nullable
ResolvedClassName

Sanitized C# class name.

string
nullable
ResolvedDisplayName

Resolved display name used by the template.

string
nullable
ResolvedStableKey

Resolved stable key used by the template.

string
nullable
TargetEntityDefinitionId

Resolved target Entity Definition id, when applicable.

string
nullable
TargetEntityClrType

Generated workspace contract CLR type for the target entity, when applicable.

string
nullable
Warnings

Non-blocking preview warnings.

Array<string>
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Bad Request

Media typeapplication/json
object
Data

Generated Net Operation Project source template preview.

object
TemplateId

Template identifier.

string
nullable
ProposedPath

Normalized source path for the generated file.

string
nullable
Content

Generated C# source content.

string
nullable
ResolvedClassName

Sanitized C# class name.

string
nullable
ResolvedDisplayName

Resolved display name used by the template.

string
nullable
ResolvedStableKey

Resolved stable key used by the template.

string
nullable
TargetEntityDefinitionId

Resolved target Entity Definition id, when applicable.

string
nullable
TargetEntityClrType

Generated workspace contract CLR type for the target entity, when applicable.

string
nullable
Warnings

Non-blocking preview warnings.

Array<string>
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Forbidden

Media typeapplication/json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Media typeapplication/json
object
Data

Generated Net Operation Project source template preview.

object
TemplateId

Template identifier.

string
nullable
ProposedPath

Normalized source path for the generated file.

string
nullable
Content

Generated C# source content.

string
nullable
ResolvedClassName

Sanitized C# class name.

string
nullable
ResolvedDisplayName

Resolved display name used by the template.

string
nullable
ResolvedStableKey

Resolved stable key used by the template.

string
nullable
TargetEntityDefinitionId

Resolved target Entity Definition id, when applicable.

string
nullable
TargetEntityClrType

Generated workspace contract CLR type for the target entity, when applicable.

string
nullable
Warnings

Non-blocking preview warnings.

Array<string>
nullable
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}