jsonignore使用openapi规范

wvyml7n5  于 2021-07-06  发布在  Java
关注(0)|答案(0)|浏览(239)

我使用openapi规范生成javapojo。我需要在openapi yaml中指定什么来生成等效的pojo?

...
@JsonIgnore
public String ignoredProperty;
...

我有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

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题