Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AllOf not generated #361

Open
NickRandal opened this issue Oct 31, 2024 · 0 comments
Open

AllOf not generated #361

NickRandal opened this issue Oct 31, 2024 · 0 comments

Comments

@NickRandal
Copy link

NickRandal commented Oct 31, 2024

Using 3.0.16

schema.AllOf.Add(
			new JSchema
			{
				Description = "Path is required when using the Custom step type.",

				If = new JSchema
				{
					Properties =
					{
						{ "StepType", new JSchema { Const = Configuration.StepType.Custom.ToString() } }
					},
					Required = { "StepType" }
				},
				Then = new JSchema
				{
					Required = { "Path" }
				}
			}
		);

Produces

"allOf": [
        {
          "description": "Path is required when using the Custom step type."
        }
      ]

This ultimately was my mistake because I had chosen Draft 06 version instead of the required 07.

Knowing that would it be possible to have an exception thrown when If, Else or Then are not null and Draft 07 is not in use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant