github.com/emreu/go-swagger@v0.22.1/fixtures/bugs/1479/fixture-1479-part.yaml (about)

     1  swagger: '2.0'
     2  
     3  info:
     4    version: "1.0.0"
     5    title: "check nested AllOf validations (from Pouch Engine API)"
     6    description: |
     7      The breakage with allOf occurs when a schema with an allOf has itself a  
     8      property which is an allOf construct
     9  produces:
    10    - application/json
    11  consumes:
    12    - application/json
    13  paths:
    14    /models:
    15      get:
    16        operationId: modelOp
    17        summary: many model variations
    18        description: nothing
    19        tags:
    20          - testcgen
    21        responses:
    22          default:
    23            description: Generic Out
    24  definitions:
    25    ContainerCreateConfig:
    26      allOf:
    27        - $ref: "#/definitions/ContainerConfig"
    28        - type: "object"
    29          properties:
    30            HostConfig:
    31              $ref: "#/definitions/HostConfig"
    32            NetworkingConfig:
    33              $ref: "#/definitions/NetworkingConfig"
    34    ContainerConfig:
    35      type: "object"
    36      description: "Configuration for a container that is portable between hosts"
    37      required: 
    38        - Image
    39      properties:
    40        Hostname:
    41          description: "The hostname to use for the container, as a valid RFC 1123 hostname."
    42          type: "string"
    43          format: hostname
    44          minLength: 1
    45        Domainname:
    46          description: "The domain name to use for the container."
    47          type: "string"
    48        User:
    49          description: "The user that commands are run as inside the container."
    50          type: "string"
    51        AttachStdin:
    52          description: "Whether to attach to `stdin`."
    53          type: "boolean"
    54          x-nullable: false
    55        AttachStdout:
    56          description: "Whether to attach to `stdout`."
    57          type: "boolean"
    58          x-nullable: false
    59          default: true
    60        AttachStderr:
    61          description: "Whether to attach to `stderr`."
    62          type: "boolean"
    63          x-nullable: false
    64          default: true
    65        ExposedPorts:
    66          description: "An object mapping ports to an empty object in the form:`{<port>/<tcp|udp>: {}}`"
    67          type: "object"
    68          additionalProperties:
    69            type: "object"
    70            enum:
    71              - {}
    72            default: {}
    73        Tty:
    74          description: "Attach standard streams to a TTY, including `stdin` if it is not closed."
    75          type: "boolean"
    76          x-nullable: false
    77        OpenStdin:
    78          description: "Open `stdin`"
    79          type: "boolean"
    80          x-nullable: false
    81        StdinOnce:
    82          description: "Close `stdin` after one attached client disconnects"
    83          type: "boolean"
    84          x-nullable: false
    85        Env:
    86          description: |
    87            A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value.
    88          type: "array"
    89          items:
    90            type: "string"
    91        Cmd:
    92          description: "Command to run specified an array of strings."
    93          type: "array"
    94          items:
    95            type: "string"
    96        ArgsEscaped:
    97          description: "Command is already escaped (Windows only)"
    98          type: "boolean"
    99          x-nullable: false
   100        Image:
   101          description: "The name of the image to use when creating the container"
   102          type: "string"
   103          x-nullable: false
   104        Volumes:
   105          description: "An object mapping mount point paths inside the container to empty objects."
   106          type: "object"
   107          additionalProperties:
   108            type: "object"
   109            enum:
   110              - {}
   111            default: {}
   112        WorkingDir:
   113          description: "The working directory for commands to run in."
   114          type: "string"
   115        Entrypoint:
   116          description: |
   117            The entry point for the container as a string or an array of strings.
   118            If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default.
   119          type: "array"
   120          items:
   121            type: "string"
   122        NetworkDisabled:
   123          description: "Disable networking for the container."
   124          type: "boolean"
   125        MacAddress:
   126          description: "MAC address of the container."
   127          type: "string"
   128        OnBuild:
   129          description: "`ONBUILD` metadata that were defined."
   130          type: "array"
   131          items:
   132            type: "string"
   133        Labels:
   134          description: "User-defined key/value metadata."
   135          type: "object"
   136          additionalProperties:
   137            type: "string"
   138        StopSignal:
   139          description: "Signal to stop a container as a string or unsigned integer."
   140          type: "string"
   141          default: "SIGTERM"
   142          x-nullable: false
   143        StopTimeout:
   144          description: "Timeout to stop a container in seconds."
   145          type: "integer"
   146          default: 10
   147        Shell:
   148          description: "Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell."
   149          type: "array"
   150          items:
   151            type: "string"
   152        Rich:
   153          type: "boolean"
   154          description: "Whether to start container in rich container mode. (default false)"
   155          x-nullable: false
   156        RichMode:
   157          type: "string"
   158          description: "Choose one rich container mode.(default dumb-init)"
   159          enum:
   160            - "dumb-init"
   161            - "sbin-init"
   162            - "systemd"
   163        InitScript:
   164          type: "string"
   165          description: "Initial script executed in container. The script will be executed before entrypoint or command"
   166        DiskQuota:
   167          type: "object"
   168          description: "Set disk quota for container"
   169          x-nullable: true
   170          additionalProperties:
   171            type: "string"
   172        SpecAnnotation:
   173          description: "annotations send to runtime spec."
   174          type: "object"
   175          additionalProperties:
   176            type: "string"
   177        QuotaID:
   178          type: "string"
   179          description: "set disk quota by specified quota id, if id < 0, it means pouchd alloc a unique quota id"
   180   
   181    NetworkingConfig:
   182      description: "Configuration for a network used to create a container."
   183      type: "object"
   184      properties:
   185        EndpointsConfig:
   186          additionalProperties:
   187            $ref: "#/definitions/EndpointSettings"
   188            x-nullable: true
   189  
   190    EndpointSettings:
   191      description: "Configuration for a network endpoint."
   192      type: "object"
   193      properties:
   194        # Configurations
   195        IPAMConfig:
   196          $ref: "#/definitions/EndpointIPAMConfig"
   197          x-nullable: true
   198        Links:
   199          type: "array"
   200          items:
   201            type: "string"
   202          example:
   203            - "container_1"
   204            - "container_2"
   205        Aliases:
   206          type: "array"
   207          items:
   208            type: "string"
   209          example:
   210            - "server_x"
   211            - "server_y"
   212  
   213        # Operational data
   214        NetworkID:
   215          description: |
   216            Unique ID of the network.
   217          type: "string"
   218          example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a"
   219        EndpointID:
   220          description: |
   221            Unique ID for the service endpoint in a Sandbox.
   222          type: "string"
   223          example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b"
   224        Gateway:
   225          description: |
   226            Gateway address for this network.
   227          type: "string"
   228          example: "172.17.0.1"
   229        IPAddress:
   230          description: |
   231            IPv4 address.
   232          type: "string"
   233          example: "172.17.0.4"
   234        IPPrefixLen:
   235          description: |
   236            Mask length of the IPv4 address.
   237          type: "integer"
   238          example: 16
   239        IPv6Gateway:
   240          description: |
   241            IPv6 gateway address.
   242          type: "string"
   243          example: "2001:db8:2::100"
   244        GlobalIPv6Address:
   245          description: |
   246            Global IPv6 address.
   247          type: "string"
   248          example: "2001:db8::5689"
   249        GlobalIPv6PrefixLen:
   250          description: |
   251            Mask length of the global IPv6 address.
   252          type: "integer"
   253          format: "int64"
   254          example: 64
   255        MacAddress:
   256          description: |
   257            MAC address for the endpoint on this network.
   258          type: "string"
   259          example: "02:42:ac:11:00:04"
   260        DriverOpts:
   261          description: |
   262            DriverOpts is a mapping of driver options and values. These options
   263            are passed directly to the driver and are driver specific.
   264          type: "object"
   265          x-nullable: true
   266          additionalProperties:
   267            type: "string"
   268          example:
   269            com.example.some-label: "some-value"
   270            com.example.some-other-label: "some-other-value"
   271  
   272    EndpointIPAMConfig:
   273      description: "IPAM configurations for the endpoint"
   274      type: "object"
   275      properties:
   276        IPv4Address:
   277          description: "ipv4 address"
   278          type: "string"
   279        IPv6Address:
   280          description: "ipv6 address"
   281          type: "string"
   282        LinkLocalIPs:
   283          description: "link to the list of local ip"
   284          type: "array"
   285          x-nullable: false
   286          items:
   287            type: "string"
   288  
   289    HostConfig:
   290      description: "Container configuration that depends on the host we are running on"
   291      type: "object"
   292      allOf:
   293        - properties:
   294            # Applicable to all platforms
   295            Binds:
   296              type: "array"
   297              description: |
   298                A list of volume bindings for this container. Each volume binding is a string in one of these forms:
   299  
   300                - `host-src:container-dest` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
   301                - `host-src:container-dest:ro` to make the bind mount read-only inside the container. Both `host-src`, and `container-dest` must be an _absolute_ path.
   302                - `volume-name:container-dest` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path.
   303                - `volume-name:container-dest:ro` to mount the volume read-only inside the container.  `container-dest` must be an _absolute_ path.
   304              items:
   305                type: "string"
   306            ContainerIDFile:
   307              type: "string"
   308              description: "Path to a file where the container ID is written"
   309            LogConfig:
   310              type: "object"
   311              description: "The logging configuration for this container"
   312              properties:
   313                Type:
   314                  type: "string"
   315                  enum:
   316                    - "json-file"
   317                    - "syslog"
   318                    - "journald"
   319                    - "gelf"
   320                    - "fluentd"
   321                    - "awslogs"
   322                    - "splunk"
   323                    - "etwlogs"
   324                    - "none"
   325                Config:
   326                  type: "object"
   327                  additionalProperties:
   328                    type: "string"
   329            RestartPolicy:
   330              type: "object"
   331              description: "Restart policy to be used to manage the container"
   332              $ref: "#/definitions/RestartPolicy"
   333            NetworkMode:
   334              type: "string"
   335              description: "Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:<name|id>`. Any other value is taken as a custom network's name to which this container should connect to."
   336            AutoRemove:
   337              type: "boolean"
   338              description: "Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set."
   339            VolumeDriver:
   340              type: "string"
   341              description: "Driver that this container uses to mount volumes."
   342            VolumesFrom:
   343              type: "array"
   344              description: "A list of volumes to inherit from another container, specified in the form `<container name>[:<ro|rw>]`."
   345              items:
   346                type: "string"
   347            CapAdd:
   348              type: "array"
   349              description: "A list of kernel capabilities to add to the container."
   350              items:
   351                type: "string"
   352            CapDrop:
   353              type: "array"
   354              description: "A list of kernel capabilities to drop from the container."
   355              items:
   356                type: "string"
   357            Dns:
   358              type: "array"
   359              description: "A list of DNS servers for the container to use."
   360              items:
   361                type: "string"
   362            DnsOptions:
   363              type: "array"
   364              description: "A list of DNS options."
   365              items:
   366                type: "string"
   367            DnsSearch:
   368              type: "array"
   369              description: "A list of DNS search domains."
   370              items:
   371                type: "string"
   372            ExtraHosts:
   373              type: "array"
   374              description: |
   375                A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`.
   376              items:
   377                type: "string"
   378            GroupAdd:
   379              type: "array"
   380              description: "A list of additional groups that the container process will run as."
   381              items:
   382                type: "string"
   383            IpcMode:
   384              type: "string"
   385              description: |
   386                      IPC sharing mode for the container. Possible values are:
   387                      - `"none"`: own private IPC namespace, with /dev/shm not mounted
   388                      - `"private"`: own private IPC namespace
   389                      - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers
   390                      - `"container:<name|id>"`: join another (shareable) container's IPC namespace
   391                      - `"host"`: use the host system's IPC namespace
   392                      If not specified, daemon default is used, which can either be `"private"`
   393                      or `"shareable"`, depending on daemon version and configuration.
   394            Cgroup:
   395              type: "string"
   396              description: "Cgroup to use for the container."
   397            Links:
   398              type: "array"
   399              description: "A list of links for the container in the form `container_name:alias`."
   400              items:
   401                type: "string"
   402            OomScoreAdj:
   403              type: "integer"
   404              description: |
   405                  An integer value containing the score given to the container in order to tune OOM killer preferences.
   406                  The range is in [-1000, 1000].
   407              type: "integer"
   408              format: "int"
   409              x-nullable: false
   410              minimum: -1000
   411              maximum: 1000
   412            PidMode:
   413              type: "string"
   414              description: |
   415                Set the PID (Process) Namespace mode for the container. It can be either:
   416                - `"container:<name|id>"`: joins another container's PID namespace
   417                - `"host"`: use the host's PID namespace inside the container
   418            Privileged:
   419              type: "boolean"
   420              description: "Gives the container full access to the host."
   421            PublishAllPorts:
   422              type: "boolean"
   423              description: "Allocates a random host port for all of a container's exposed ports."
   424            ReadonlyRootfs:
   425              type: "boolean"
   426              description: "Mount the container's root filesystem as read only."
   427            SecurityOpt:
   428              type: "array"
   429              description: "A list of string values to customize labels for MLS systems, such as SELinux."
   430              items:
   431                type: "string"
   432            StorageOpt:
   433              type: "object"
   434              description: |
   435                Storage driver options for this container, in the form `{"size": "120G"}`.
   436              additionalProperties:
   437                type: "string"
   438            Tmpfs:
   439              type: "object"
   440              description: |
   441                A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: `{ "/run": "rw,noexec,nosuid,size=65536k" }`.
   442              additionalProperties:
   443                type: "string"
   444            UTSMode:
   445              type: "string"
   446              description: "UTS namespace to use for the container."
   447            UsernsMode:
   448              type: "string"
   449              description: "Sets the usernamespace mode for the container when usernamespace remapping option is enabled."
   450            ShmSize:
   451              type: "integer"
   452              description: "Size of `/dev/shm` in bytes. If omitted, the system uses 64MB."
   453              minimum: 0
   454            Sysctls:
   455              type: "object"
   456              description: |
   457                A list of kernel parameters (sysctls) to set in the container. For example: `{"net.ipv4.ip_forward": "1"}`
   458              additionalProperties:
   459                type: "string"
   460            Runtime:
   461              type: "string"
   462              description: "Runtime to use with this container."
   463            # Applicable to Windows
   464            ConsoleSize:
   465              type: "array"
   466              description: "Initial console size, as an `[height, width]` array. (Windows only)"
   467              minItems: 2
   468              maxItems: 2
   469              items:
   470                type: "integer"
   471                minimum: 0
   472            Isolation:
   473              type: "string"
   474              description: "Isolation technology of the container. (Windows only)"
   475              enum:
   476                - "default"
   477                - "process"
   478                - "hyperv"
   479            EnableLxcfs:
   480              description: "Whether to enable lxcfs."
   481              type: "boolean"
   482              x-nullable: false
   483            Rich:
   484              type: "boolean"
   485              description: "Whether to start container in rich container mode. (default false)"
   486              x-nullable: false
   487            RichMode:
   488              type: "string"
   489              description: "Choose one rich container mode.(default dumb-init)"
   490              enum:
   491               - "dumb-init"
   492               - "sbin-init"
   493               - "systemd"
   494            InitScript:
   495              type: "string"
   496              description: "Initial script executed in container. The script will be executed before entrypoint or command"
   497        - $ref: "#/definitions/Resources"
   498  
   499    Resources:
   500      description: "A container's resources (cgroups config, ulimits, etc)"
   501      type: "object"
   502      properties:
   503        # Applicable to all platforms
   504        CpuShares:
   505          description: "An integer value representing this container's relative CPU weight versus other containers."
   506          type: "integer"
   507        Memory:
   508          description: "Memory limit in bytes."
   509          type: "integer"
   510          default: 0
   511        # Applicable to UNIX platforms
   512        CgroupParent:
   513          description: "Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist."
   514          type: "string"
   515        BlkioWeight:
   516          description: "Block IO weight (relative weight)."
   517          type: "integer"
   518          format: "uint16"
   519          x-nullable: false
   520          minimum: 0
   521          maximum: 1000
   522  
   523    RestartPolicy:
   524      description: "Define container's restart policy"
   525      type: "object"
   526      properties:
   527        Name:
   528          type: "string"
   529        MaximumRetryCount:
   530          type: "integer"
   531