Comments (7)
I am definitely up for it, I find the links being very useful because not always the error message is clear enough and further info is needed. although I think we should make an attempt to unify the codes as well. I think that a general categorization of the warnings/errors is useful for tools using the parse result.
from api-elements.
although I think we should make an attempt to unify the codes as well
@w-vi Would we still need to provide error codes if the profile/origin link can replace their purpose? I was proposing we remove the code completely.
from api-elements.
I was personally not a fan of the codes, and I agree that the links provide the same functionality with a lot more flexibility. So I think you can capture the same info and more with links.
I think the part that will take some work is keeping the links pointing to the correct places. This is because some annotations will be parser specific rather than related to API Elements itself. But the profile link example you have above is a good one where you can fit generic errors/warnings/info into the API Elements spec itself that may be reused by tooling.
from api-elements.
Codes are convenient for programmatic approach, sure I can match the strings of the link to distinguish between warning error etc but then I need to know the errors/warnings beforehand as from the new annotation I have no idea what is it as in how I know that this is an error and not just some informational warning. To clarify, we should use codes more for categories of errors/warnings and not as the code being a sole identifier of an error.
from api-elements.
Seems like it might work well to use classes
instead of codes for those generic purposes.
from api-elements.
Seems like it might work well to use
classes
instead of codes for those generic purposes.
That sounds good to me.
I was going by the example in Swagger adapter where the origin links have a 1-1 mapping between codes for all URLs except one (https://github.com/apiaryio/fury-adapter-swagger/blob/master/src/annotations.js#L17) the fragment
is placed into the URL.
from api-elements.
classes
are good too. My main point is that I'd like to keep some generic way how tools can handle annotations and that those classes
or codes
or whatever should be unified in all parsers.
from api-elements.
Related Issues (20)
- Guidelines on how to use copy and description
- Single API Elements Package HOT 1
- Hypermedia Affordances
- Annotation "fixits" HOT 1
- Clarify source map type HOT 11
- Support files in Source Map
- Multiple responses HOT 3
- Provide information about the source ADD format and version HOT 2
- Document the migration path and changes between API Elements 0.6 and 1.0 HOT 3
- Make `HTTP Headers` an array of `HTTP Header`
- Broken mapping
- Headings have overlapping permalinks
- Link README to production docs HOT 1
- Clarify source map line/column indexing
- Exposing Deployment Information HOT 7
- API Elements evolution process
- Add repo URL for docs HOT 1
- nullable type attribute is undocumented
- Full support for expressing JSON Schema constraints in API Element data structures
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 api-elements.