小编DDK*_*DDK的帖子

使用开放 API 规范的 JsonIgnore

我使用OpenAPI规范来生成 Java POJO。我需要在 Open API yaml 中指定什么才能生成以下 POJO 的等效项?

...
@JsonIgnore
public String ignoredProperty;
...
Run Code Online (Sandbox Code Playgroud)

我的 yaml 规范如下

openapi: 3.0.0
info:
  title: Cool API
  description: A Cool API spec
  version: 0.0.1
servers:
  - url: http://api.cool.com/v1
    description: Cool server for testing
paths:
  /
  ...
components:
  schemas:
    MyPojo:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        # I want the below attribute to be ignored as a part of JSON 
        ignoreProperty:  
          type: string  
Run Code Online (Sandbox Code Playgroud)

java swagger openapi openapi-generator

9
推荐指数
1
解决办法
2586
查看次数

scp ant 从远程复制到本地并使用排除

我试图复制在远程文件服务本地使用scp的任务ant。问题是,我想排除某些带有扩展名的文件*.txt,所以我尝试使用excludes标签。但它似乎不起作用。它复制所有文件,包括带有扩展名的文件*.txt

<scp file="username:pwd@remotemachine:/path/to/files/*" todir="copycontent" trust="true">
     <fileset dir="files" >
         <exclude name="**/*.txt"/>
     </fileset>
</scp>
Run Code Online (Sandbox Code Playgroud)

ant scp

2
推荐指数
1
解决办法
5823
查看次数

标签 统计

ant ×1

java ×1

openapi ×1

openapi-generator ×1

scp ×1

swagger ×1