How to use the @stoplight/types.HttpParamStyles.CommaDelimited function in @stoplight/types

To help you get started, we’ve selected a few @stoplight/types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stoplightio / prism / packages / http / src / validator / deserializers / index.ts View on Github external
import {
  DeepObjectStyleDeserializer,
  DelimitedStyleDeserializer,
  FormStyleDeserializer,
  SimpleStyleDeserializer,
} from './style';
import { LabelStyleDeserializer } from './style/label';
import { MatrixStyleDeserializer } from './style/matrix';

export const header = new HttpParamDeserializerRegistry([new SimpleStyleDeserializer()]);

export const query = new HttpParamDeserializerRegistry([
  new FormStyleDeserializer(),
  new DelimitedStyleDeserializer('%20', HttpParamStyles.SpaceDelimited),
  new DelimitedStyleDeserializer('|', HttpParamStyles.PipeDelimited),
  new DelimitedStyleDeserializer(',', HttpParamStyles.CommaDelimited),
  new DeepObjectStyleDeserializer(),
]);

export const path = new HttpParamDeserializerRegistry([
  new SimpleStyleDeserializer(),
  new LabelStyleDeserializer(),
  new MatrixStyleDeserializer(),
]);

export const body = query;