如何在摇摇欲坠的岗位上写对象数组

时间:2020-03-12 14:03:42

标签: swagger

我想将以下内容翻译为大张旗鼓,但我似乎无法弄清楚如何处理对象数组

Starting Run on ...
No active profile set, falling back to default profiles: default
Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4516af24: startup date [Thu Mar 12 14:46:40 CET 2020]; root of context hierarchy
Using Persistence Adapter: KahaDBPersistenceAdapter[C:\developements\customers\m2sc\workspace\spring-embedded-activemq\activemq-data\localhost\KahaDB]
JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
KahaDB is version 6
Recovering from the journal @1:104464
Recovery replayed 4 operations from the journal in 0.02 seconds.
PListStore:[C:\developements\customers\m2sc\workspace\spring-embedded-activemq\activemq-data\localhost\tmp_storage] started
Apache ActiveMQ 5.14.5 (localhost, ID:INT-PWTOW02-56695-1584020801379-0:1) is starting
Connector vm://embedded?broker.persistent=false,useShutdownHook=false started
Apache ActiveMQ 5.14.5 (localhost, ID:INT-PWTOW02-56695-1584020801379-0:1) started
For help or more information please see: http://activemq.apache.org
Registering beans for JMX exposure on startup
Starting beans in phase 2147483647
Connector vm://localhost started
Spring Boot Embedded ActiveMQ Configuration Example
>> sending with convertAndSend() to queue <Order{content='0 - Sending JMS Message using Embedded activeMQ', timestamp=Thu Mar 12 14:46:41 CET 2020}>
acbc670e-de0c-49ac-96ef-763675920069 - received <Order{content='0 - Sending JMS Message using Embedded activeMQ', timestamp=Thu Mar 12 14:46:41 CET 2020}>
>> sending with convertAndSend() to queue <Order{content='1 - Sending JMS Message using Embedded activeMQ', timestamp=Thu Mar 12 14:46:42 CET 2020}>
>> sending with convertAndSend() to queue <Order{content='2 - Sending JMS Message using Embedded activeMQ', timestamp=Thu Mar 12 14:46:43 CET 2020}>
>> sending with convertAndSend() to queue <Order{content='3 - Sending JMS Message using Embedded activeMQ', timestamp=Thu Mar 12 14:46:43 CET 2020}>
>> sending with convertAndSend() to queue <Order{content='4 - Sending JMS Message using Embedded activeMQ', timestamp=Thu Mar 12 14:46:44 CET 2020}>
Waiting for all ActiveMQ JMS Messages to be consumed
10 seconds elapsed,10 more seconds to see DLQ log
Apache ActiveMQ 5.14.5 (localhost, ID:INT-PWTOW02-56695-1584020801379-0:1) is shutting down
Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@4516af24: startup date [Thu Mar 12 14:46:40 CET 2020]; root of context hierarchy
Connector vm://embedded?broker.persistent=false,useShutdownHook=false stopped
Stopping beans in phase 2147483647
Connector vm://localhost stopped
Setup of JMS message listener invoker failed for destination 'orderqueue.dlq' - trying to recover. Cause: peer (vm://localhost#1) stopped.
PListStore:[C:\developements\customers\m2sc\workspace\spring-embedded-activemq\activemq-data\localhost\tmp_storage] stopped
Stopping async queue tasks
Stopping async topic tasks
Setup of JMS message listener invoker failed for destination 'orderqueue' - trying to recover. Cause: peer (vm://localhost#3) stopped.
Stopped KahaDB
Unregistering JMX-exposed beans on shutdown
Apache ActiveMQ 5.14.5 (localhost, ID:INT-PWTOW02-56695-1584020801379-0:1) uptime 23.525 seconds
Apache ActiveMQ 5.14.5 (localhost, ID:INT-PWTOW02-56695-1584020801379-0:1) is shutdown

到目前为止,我有以下内容

POST Example: curl -X POST -d 'where=[{"service":"* Ad-hoc Submission","commsmatrix":"","src":"x","dst":"y","protocol":"TCP","ports":80},{"service":"IaC Validation","commsmatrix":0,"src":"c","dst":"u","protocol":"TCP","ports":80},{"service":"* Ad-hoc Submission","commsmatrix":0,"src":"v","dst":"i","protocol":"TCP","ports":80}]'  https://domain/iwsapi/user/verify/flow

在文档中,当我执行时会产生以下内容

/iwsapi/user/verify/flow/upload/bulk:
    post:
      summary: sometext
      operationId: sometext
      description: sometext
      requestBody: 
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/VPFBulkForm'
...
VPFBulkForm:
      type: object
      required:
      - where
      properties:
        where:
          type: object
          properties:
            cmid:
              type: number
              example: 1
            src:
              type: string
              example: x
            dst:
              type: string
              example: y
            proto:
              type: string
              example: TCP
            ports: 
              type: string
              example: 80
            service:
              type: string
              example: "* Ad-hoc Submission"

但我想生产

{
  "cmid": 1,
  "src": "x",
  "dst": "y",
  "proto": "TCP",
  "ports": 80,
  "service": "* Ad-hoc Submission"
}

0 个答案:

没有答案