public async Task SerializeReferencedHeaderAsV2JsonWorks(bool produceTerseOutput)
        {
            // Arrange
            var outputStringWriter = new StringWriter(CultureInfo.InvariantCulture);
            var writer             = new OpenApiJsonWriter(outputStringWriter, new OpenApiJsonWriterSettings {
                Terse = produceTerseOutput
            });

            // Act
            ReferencedHeader.SerializeAsV2(writer);
            writer.Flush();
            var actual = outputStringWriter.GetStringBuilder().ToString();

            // Assert
            await Verifier.Verify(actual).UseParameters(produceTerseOutput);
        }
        public void SerializeReferencedHeaderAsV2JsonWorks()
        {
            // Arrange
            var outputStringWriter = new StringWriter();
            var writer             = new OpenApiJsonWriter(outputStringWriter);
            var expected           =
                @"{
  ""$ref"": ""#/headers/example1""
}";

            // Act
            ReferencedHeader.SerializeAsV2(writer);
            writer.Flush();
            var actual = outputStringWriter.GetStringBuilder().ToString();

            // Assert
            actual   = actual.MakeLineBreaksEnvironmentNeutral();
            expected = expected.MakeLineBreaksEnvironmentNeutral();
            actual.Should().Be(expected);
        }
        public void SerializeAdvancedHeaderAsV2JsonWorks()
        {
            // Arrange
            var outputStringWriter = new StringWriter();
            var writer             = new OpenApiJsonWriter(outputStringWriter);
            var expected           =
                @"{
  ""description"": ""sampleHeader"",
  ""type"": ""integer"",
  ""format"": ""int32""
}";

            // Act
            AdvancedHeader.SerializeAsV2(writer);
            writer.Flush();
            var actual = outputStringWriter.GetStringBuilder().ToString();

            // Assert
            actual   = actual.MakeLineBreaksEnvironmentNeutral();
            expected = expected.MakeLineBreaksEnvironmentNeutral();
            actual.Should().Be(expected);
        }