Comments (4)
Do you remember when I mentioned that I was considering creating two schemas to solve the issue where a property should be part of the input and not the output or vice versa? OpenAPI options readOnly
and writeOnly
intend to solve this problem in a DRY way.
The problem that you report is actually due to connexion-Flask not respecting the option readOnly
and writeOnly
when generating examples of request bodies. Here id
is marked as readOnly
and so should only be included in output objects. You can confirm this by looking at the schema of the request body where id
is not included.
Here is what OpenApi doc says for readOnly
:
Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as readOnly being true and is in the required list, the required will take effect on the response only. A property MUST NOT be marked as both readOnly and writeOnly being true. Default value is false.
Note the use of "SHOULD NOT" and not "MUST NOT" in "SHOULD NOT be sent as part of the request". This means that connexion-Flask should not throw an error if a property marked as readOnly
is included in the request body.
Open discussion in connexion
project:
spec-first/connexion#942
spec-first/connexion#350
The solution described here as part of 942 complicates the code too much and I don't want this to confuse our developers since we provide this code as example.
from nlpsandbox-schemas.
Open tickets for OpenAPITools/openapi-generator:
OpenAPITools/openapi-generator#4190
from nlpsandbox-schemas.
The resolution is that 'id' needs to be removed from clinical notes prior to annotation.
from nlpsandbox-schemas.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from nlpsandbox-schemas.
Related Issues (20)
- Release schemas 1.1.2 HOT 1
- Add requirements section to README HOT 2
- Create edge-<sha> release HOT 1
- Set branch main as default HOT 2
- Review versioning section HOT 2
- Change Example DeidentifyRequest to Use All AnnotationTypes
- Update PHI deidentifier example input to include an instance of ID and contact information
- Enable one API service to implement multiple tools HOT 4
- Increase max length of Tool.description HOT 1
- Update OpenAPI documentation logo HOT 1
- Consider renaming PhysicalAddress to Location HOT 2
- Remove manually merged schemas
- Release schemas 1.2.0 HOT 1
- Identify how to protect gh-pages branch so that PR can push to it HOT 3
- Update description of COVID symptom annotator in openapi.yaml
- Add platform endpoints HOT 1
- Python Flask apps do not include Error-based models
- Capture information about the programming language(s) used by a tool HOT 1
- Capture whether a Tool implement an ensemble strategy HOT 3
- Capture information about NLP models
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nlpsandbox-schemas.