openapi-processor / openapi-processor/openapi-processor-spring

interpretation of openapi readOnly flag in model

オープン
#334 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Kotlin
スター
56
フォーク
11
平均マージ
2日 4時間
マージ済み PR(30日)
8

説明

Given a definition like:

``yaml

Data:
  type: object
  properties:        
    status:
      type: string)
      readOnly: true

get generated java:


```java

public record Data {
    @JsonProperty(value = "status", access = JsonProperty.Access.READ_ONLY)
    String status
) {}

This is correct if the generated code is for the provider of the interface (i.e. server-side). But if the code is to be the client of the interface, the field should instead be annotated with JsonProperty.Access.WRITE_ONLY.

So, as a feature request, it would be useful if there was a code generation option that declared the intended usage of the generated code.

See: https://fasterxml.github.io/jackson-annotations/javadoc/2.6/com/fasterxml/jackson/annotation/JsonProperty.Access.html

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Issue では、ソースファイル、テスト、エントリポイントが特定されていません。まず、generator が OpenAPI の readOnly プロパティを Jackson のアクセスアノテーションにどのようにマッピングしているかを追跡し、次に provider-versus-client の生成オプションをどこで設定すべきかを判断し、両方のモードをカバーするテストを定義してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, openapi, spring-boot
領域
backend-api-design, tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。