mirror of
https://github.com/encounter/JSONAPI.git
synced 2026-03-30 11:18:38 -07:00
63 lines
1.2 KiB
Swift
63 lines
1.2 KiB
Swift
//
|
|
// Sampleable+JSONAPI.swift
|
|
// JSONAPIOpenAPI
|
|
//
|
|
// Created by Mathew Polzin on 1/24/19.
|
|
//
|
|
|
|
import JSONAPI
|
|
|
|
extension NoAttributes: Sampleable {
|
|
public static var sample: NoAttributes {
|
|
return .none
|
|
}
|
|
}
|
|
|
|
extension NoRelationships: Sampleable {
|
|
public static var sample: NoRelationships {
|
|
return .none
|
|
}
|
|
}
|
|
|
|
extension NoMetadata: Sampleable {
|
|
public static var sample: NoMetadata {
|
|
return .none
|
|
}
|
|
}
|
|
|
|
extension NoLinks: Sampleable {
|
|
public static var sample: NoLinks {
|
|
return .none
|
|
}
|
|
}
|
|
|
|
extension NoAPIDescription: Sampleable {
|
|
public static var sample: NoAPIDescription {
|
|
return .none
|
|
}
|
|
}
|
|
|
|
extension UnknownJSONAPIError: Sampleable {
|
|
public static var sample: UnknownJSONAPIError {
|
|
return .unknownError
|
|
}
|
|
}
|
|
|
|
extension Attribute: Sampleable where RawValue: Sampleable {
|
|
public static var sample: Attribute<RawValue> {
|
|
return .init(value: RawValue.sample)
|
|
}
|
|
}
|
|
|
|
extension SingleResourceBody: Sampleable where Entity: Sampleable {
|
|
public static var sample: SingleResourceBody<Entity> {
|
|
return .init(entity: Entity.sample)
|
|
}
|
|
}
|
|
|
|
extension ManyResourceBody: Sampleable where Entity: Sampleable {
|
|
public static var sample: ManyResourceBody<Entity> {
|
|
return .init(entities: Entity.samples)
|
|
}
|
|
}
|