cfdocs icon indicating copy to clipboard operation
cfdocs copied to clipboard

Have CF+, or Lucee+ work to indicate an argument or feature that is only supported by a specific engine.

Open mjhagen opened this issue 9 years ago • 15 comments

Would work the same way as CF9+ just without the version number.

mjhagen avatar Jun 10 '16 10:06 mjhagen

That would be handy in some cases I think so I'm not opposed to adding that. I do prefer if the version number is included if possible since that is useful information in most cases.

pfreitag avatar Jun 10 '16 17:06 pfreitag

I ran into one on directoryList, the type argument is only available on ACF, I wondered if I should add a note for Lucee/Railo/BD, or one for ACF and thought that just having a label on the argument itself would be clearer (right now I added CF9+ on that arg.)

mjhagen avatar Jun 10 '16 18:06 mjhagen

👍 on this idea. Similar to the browser table on e.g. Mozilla Developer Network: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/concat

timbeadle avatar Aug 24 '16 07:08 timbeadle

(& I was tripped up by string.replaceList() not being implemented on Lucee 4.5)

timbeadle avatar Aug 24 '16 07:08 timbeadle

Keep in mind that features can be removed (e. g. CF11-). Should it be releated to engines.minimum_version?

shaedrich avatar Aug 24 '17 11:08 shaedrich

An engines object would be good for this, but it would need to relate to each parameter instead of the entity as a whole. Also, @shaedrich brings up a good point. The engine object should also indicate when something was deprecated or removed, in addition to when it was introduced. Perhaps something like

"params": [
	{
		"name":"funcArgNameOrTagAttributeName",
		"description":"What it does",
		"required":true,
		"default":"false",
		"type":"boolean",
		"values":["true","false"],
		"engines": {
			"coldfusion": {"minimum_version":"10", "deprecated":"", "removed":"", "notes":"CF Specific Info Here"},
			"railo": {"minimum_version":"4.1", "deprecated":"", "removed":"", "notes":"Railo Specific Here"},
			"lucee": {"minimum_version":"4.5", "deprecated":"", "removed":"", "notes":"Lucee Specific Info Here"}
		}
	}
]

KamasamaK avatar Aug 25 '17 22:08 KamasamaK

- could indicate a removed feature, but how about a deprecated one? (@KamasamaK good idea to add deprecations as well)

shaedrich avatar Aug 25 '17 23:08 shaedrich

This should be done for values as well.

shaedrich avatar Sep 05 '17 10:09 shaedrich

We currently have support for deprecated tags/functions in the engines key but not specific attributes / arguments. My preference for implementing this would be to replicate the sytanx used in the engines key and add it to the object in the params key.

pfreitag avatar Sep 07 '17 15:09 pfreitag

It also supports features that have been removed... Here is an example of a tag that was deprecated in CF6 then removed in CF11 https://cfdocs.org/cfservletparam https://github.com/foundeo/cfdocs/edit/master/data/en/cfservletparam.json

"engines": {
	"coldfusion": {"minimum_version":"4.5","deprecated":"6", "removed":"11", "notes":"", "docs":"..."}		
}

pfreitag avatar Sep 07 '17 15:09 pfreitag

I did find that it supports deprecated and removed when looking at the code (I initially had named them deprecated_version and removed_version to match minimum_version), but missed them previously since they were not in the JSON File Documentation of the README. I would be fine with creating a proper JSON schema that could be referenced as well.

KamasamaK avatar Sep 07 '17 15:09 KamasamaK

You are right. But why are the positions of deprecated and removed switched under syntax and compatibility?

To display deprecated and removed version number as alert boxes but minimum_version as label seems a bit inconsistend to me. I would suggest to change CF4.5+ to more clear CF4.5-11.

shaedrich avatar Sep 07 '17 15:09 shaedrich

@shaedrich - no good reason they are switched, it probably makes sense to show removed first, then deprecated since. Also it would be good to show CF4.5-11

@KamasamaK - yeah need to add those to the docs... A JSON schema would be great!!!

pfreitag avatar Sep 07 '17 15:09 pfreitag

Does the ci currently check more than just the validity in the JSON?

shaedrich avatar Sep 07 '17 15:09 shaedrich

Yes the ci does do additional checks besides json validity, it checks that the result is correct in the examples. It also looks for a few required things in the JSON file, but having a proper JSON schema would be great because I could add that to the CI tests.

pfreitag avatar Sep 07 '17 16:09 pfreitag