swagger-api / swagger-api/swagger-codegen

Read-only Attributes in API client's models

Open
#3,210 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: General help wanted
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

DESCRIPTION

As discussed with @fehguy, we'll not do anything special for read-only attributes in API clients' models.

IMPACT
  • some model constructors (method signature) will be changed as the read-only attributes will have a setter (which means the attribute value can be changed in the API client while the server should ignore the change when receiving the request)
  • read-only attributes will have setters
  • the change only impact some languages (e.g. C# API client) as read-only attributes without setters are only implemented for a small number of API clients
WHEN

We'll make the change on Jul 1st, 2016.

QUESTION

If you've any question or feedback, please reply to let us know.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the generated API client model templates, especially the C# client models and their constructors. Compare how read-only attributes are represented and verify that affected models expose setters while the server ignores those values on requests; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.